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

Explain rethrowing exceptions with an example?

602


What is the use of setprecision in c++?

538


What is difference between class and function?

580


How can a called function determine the number of arguments that have been passed to it?

655


How the endl and setw manipulator works?

553






Write a program in c++ to print the numbers from n to n2 except 5 and its multiples

2030


Is c++ a difficult language?

568


What is runtime polymorphism in c++?

580


What is object in c++ wikipedia?

566


What are the advantages of c++?

589


What is the size of a vector?

570


How to get the current position of the file pointer?

548


Program to check whether a word is a sub-string or not of a string typed

1590


What is this weird colon-member (" : ") syntax in the constructor?

539


What type of question are asked in GE code writing test based on c++ data structures and pointers?

3501