can i know the source code for reversing a linked list with
out using a temporary variable?
Answer Posted / vishnu948923
struct node* reverse(struct node* first)
{
struct node* cur, temp;
cur=NULL;
while(first!=NULL)
{
temp=first;
first=first->link;
temp->link=cur;
cur=temp;
}
return cur;
}
| Is This Answer Correct ? | 5 Yes | 5 No |
Post New Answer View All Answers
What are the different file extensions involved when programming in C?
which of the following is not a character constant a) 'thank you' b) 'enter values of p, n ,r' c) '23.56E-o3' d) all of the above
How can I find the modification date and time of a file?
What is the difference between char array and char pointer?
Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.
Explain how do you search data in a data file using random access method?
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10
How are variables declared in c?
how can use subset in c program and give more example
What is #define in c?
Why is c fast?
Explain the ternary tree?
What are structures and unions? State differencves between them.
Which is better malloc or calloc?
Write a program to show the change in position of a cursor using c