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
Explain how the virtual base class is different from the conventional base classes of the opps.
Why do we need constructors in c++?
How do you compile the source code with your compiler?
What is a static member?
What is a linked list in c++?
Using a smart pointer can we iterate through a container?
Write about c++ storage classes?
What is the use of ::(scope resolution operator)?
What do you mean by delegate? Can a user retain delegates?
How would you implement a substr() function that extracts a sub string from a given string?
What is the use of this pointer in c++?
Difference between inline functions and macros?
What is the use of register keyword with the variables?
What is constructor c++?
What is vector processing?