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 merge sort in c?
What does == mean in texting?
What functions are in conio h?
How can I read and write comma-delimited text?
If the size of int data type is two bytes, what is the range of signed int data type?
How do you view the path?
Explain how do you list files in a directory?
Can a pointer be null?
Explain what does the function toupper() do?
What are the types of c language?
What is meant by inheritance?
Why isnt any of this standardized in c?
Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college. 1.write a function to print names of all students who joined in a particular year 2.write a function to print the data of a student whose roll number is given
What is logical error?
Why is c so powerful?