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
State the difference between pre and post increment/decrement operations.
What is a constructor in c++ with example?
Explain the different access specifiers for the class member in c++.
What is the difference between delegation and implemented-in-terms-of?
What are the benefits of oop in c++?
What is the v-ptr?
How can virtual functions in c++ be implemented?
What is atoi?
What is the use of data hiding?
Explain differences between alloc() and free()?
Can a Structure contain a Pointer to itself?
What are the 2 main types of data structures?
State two differences between C and C++.
Why do we need runtime polymorphism in c++?
What happens when the extern "c" char func (char*,waste) executes?