Write a program to reverse a linked list?

Answer Posted / jithin

reverse(Node * previous, Node * Current)
{
start = current;
if(current !=null)
{
reverse(current, current->next);
current->next = previous;
}

}

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an operator in c++?

621


How many static variables are created if you put one static member into a template class definition?

577


Can malloc be used in c++?

581


What are punctuators in c++?

661


What are static type checking?

643






How do you flush a buffer in c++?

612


Discussion on error handling of C++ .

658


What function initalizes variables in a class: a) Destructor b) Constitutor c) Constructor

683


How the virtual functions maintain the call up?

616


What is #include iostream in c++?

597


What are the two shift operators and what are their functions?

570


If you hear the cpu fan is running and the monitor power is still on, but you did not see anything show up in the monitor screen. What would you do to find out what is going wrong?

558


What is c++ w3school?

641


Write a program which uses Command Line Arguments

642


What are the various storage classes in C++?

653