686 views
3 votes
3 votes

Consider the given Doubly Linked List:

Consider C like language code snippet with respect to doubly linked list given

"p" is pointer to linked list node

p=first->next->next->next->prev;
p->next->next->prev=p;
printf("%d",p->next->next->prev->next->data);

What is the output?Plz explain

1 Answer

Best answer
7 votes
7 votes

Such questions are better done using pointer diagrams . Let us show each step of that as follows :

selected by

Related questions