can i know the source code for reversing a linked list with
out using a temporary variable?

Answer Posted / zhangwy

void Func( struct Node* List )
{
if( List && List->Next )
{
Func( List->Next );

List->Next->Next = List;
List->next = NULL ;

}
}

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a method in c?

630


Can you tell me how to check whether a linked list is circular?

781


Explain what are linked list?

628


Do character constants represent numerical values?

848


How a string is stored in c?

592






Can you please compare array with pointer?

621


What is getch() function?

654


In which language linux is written?

607


Is c a great language, or what?

610


What are the features of c language?

625


a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list

639


Why is %d used in c?

569


main() { printf("hello"); fork(); }

701


How do we declare variables in c?

579


#include { printf("Hello"); } how compile time affects when we add additional header file .

1430