can i know the source code for reversing a linked list with
out using a temporary variable?
Answer Posted / abdur rab
struct node* reverse ( struct node* head )
{
struct node* temp;
if ( NULL == head -> next ) temp = head;
else {
temp = reverse ( head -> next );
head -> next -> next = head;
head -> next = NULL;
}
return ( temp );
}
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
What is use of null pointer in c?
Ow can I insert or delete a line (or record) in the middle of a file?
how could explain about job profile
How can I get random integers in a certain range?
What does node * mean?
What is multidimensional arrays
What is a good way to implement complex numbers in c?
What is call by value in c?
Can math operations be performed on a void pointer?
Can a program have two main functions?
Is file a keyword in c?
please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?
Write a program to print fibonacci series without using recursion?
What does the && operator do in a program code?