Write a program to reverse a linked list?
Answer Posted / surendra
suppose p is the head pointer.
r=NULL;
while(p)
{
q=r;
r=p;
p=p->next;
r->next=q;
}
p=r;
| Is This Answer Correct ? | 16 Yes | 7 No |
Post New Answer View All Answers
What are c++ data types?
What is iomanip c++?
What is c strings syntax?
What is a string example?
Define linked lists with the help of an example.
Is c++ harder than java?
When are exception objects created?
What is anonymous object in c++?
Why c++ is called oop?
Can you please explain the difference between using macro and inline functions?
What is helper in c++?
What are the advantages of using a pointer?
What is the sequence of destruction of local objects?
what is upcasting in C++?
What is split a string in c++?