Answers for "given a linked list. print all the elements of the linked list."

C++
0

print elements of linked list

void printLinkedList(SinglyLinkedListNode* head) {
while(head!=NULL)
{
cout<<head->data<<endl;
head=head->next;
}
​
}
Posted by: Guest on April-08-2021

Browse Popular Code Answers by Language