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
why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above
Tell me what are bitwise shift operators?
write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays
Write a program that accept anumber in words
Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix
How can you tell whether two strings are the same?
What is the size of enum in bytes?
Who is the main contributor in designing the c language after dennis ritchie?
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. 2) the Event Manager has to send participants to the stage to perform in the order in which they registered. Write a program that will help the Event Manager know who to call to the stage to perform. The Logic should be in Data Structures
What is the use of in c?
What are preprocessor directives?
What is a stream?
What are the uses of a pointer?
Is c is a procedural language?
How are pointers declared in c?