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 ca high or low level language?
the first character in the variable name must be an a) special symbol b) number c) alphabet
When should I use unitbuf flag?
What is a type library?
Which is the best c++ compiler for beginners?
What does I ++ mean in c++?
Explain the scope of resolution operator.
Why was c++ created?
How a modifier is similar to mutator?
What is the difference between new() and malloc()?
What is the role of copy constructor in copying of thrown objects?
Is it possible to write a c++ template to check for a function's existence?
What are register variables?
What are the differences between java and c++?
What operators can you overload in c++?