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

How important is c++?

522


What are friend functions in C++?

613


Which software is best for programming?

652


How is c++ used in the real world?

565


Which function cannot be overloaded c++?

573






What are the operators in c++?

586


What is endl c++?

595


Do you know about C++ 11 standard?

629


In int main(int argc, char *argv[]) what is argv[0] a) The first argument passed into the program b) The program name c) You can't define main like that

606


Differentiate between realloc() and free().

588


Which command properly allocates memory a) char *a=new char[20]; b) char a=new char[20]; c) char a=new char(20.0);

608


Differentiate between the manipulator and setf( ) function?

586


what are the decision making statements in C++? Explain if statement with an example?

648


What methods can be overridden in java?

662


Why is it called c++?

576