Write a program to reverse a linked list?
Answer Posted / bipin pandey
node *reverse(node *first)
{
node *cur,*temp;
cur=NULL;
while(first!=NULL)
{temp=first;
first=first->link;
temp->link=cur;
cur=temp;
}
return cur;
}
Is This Answer Correct ? | 5 Yes | 4 No |
Post New Answer View All Answers
Is c++ the most powerful language?
Difference between a homogeneous and a heterogeneous container
What is namespace & why it is used in c++?
Why c++ is not a pure oop language?
What is the real purpose of class – to export data?
Can union be self referenced?
What jobs can you get with a c++ certification?
What is type of 'this' pointer?
List down the guideline that should be followed while using friend function.
How do you generate a random number in c++?
What is buffer and example?
Define pointers?
What is a local reference?
Does c++ vector allocate memory?
What is the this pointer?