9. Consider the non-empty singly linked list with header node, containing the nodes in the order: [ header-node, 14, 10, 5 ]. Assume the Nodeptr head points to the header-node of the list. Predict the...


9. Consider the non-empty singly linked list<br>with header node, containing the nodes in<br>the order:<br>[ header-node, 14, 10, 5 ].<br>Assume the Nodeptr head points to the<br>header-node of the list. Predict the output of<br>the following function, when the above list is<br>passed as a parameter.<br>void Search(Nodeptr head){<br>Nodeptr p1,p2;<br>p1= p2=head;<br>while(p2){<br>p1=p1->next;<br>p2= p2->next?p2->next->next-<br>>next:NULL;<br>}<br>printf(data); O 14 NULL O 10 "/>
Extracted text: 9. Consider the non-empty singly linked list with header node, containing the nodes in the order: [ header-node, 14, 10, 5 ]. Assume the Nodeptr head points to the header-node of the list. Predict the output of the following function, when the above list is passed as a parameter. void Search(Nodeptr head){ Nodeptr p1,p2; p1= p2=head; while(p2){ p1=p1->next; p2= p2->next?p2->next->next- >next:NULL; } printf("%d",p1->data); O 14 NULL O 10

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here