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
How to implement a packet in C
Explain the binary height balanced tree?
What is the purpose of sprintf() function?
"C" language developed by "Dennis Ritchie" at AT & T. his remarks are a) too general, too abstract b) could deal with only specific problems c) lost generality of BCPL and B restored d) no remarks
What is preprocessor with example?
Explain what is the difference between far and near ?
List some of the static data structures in C?
What is use of integral promotions in c?
How can you increase the size of a statically allocated array?
What are the types of variables in c?
in linking some of os executables are linking name some of them
Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?
What are structure types in C?
How do you redirect a standard stream?
How many types of errors are there in c language? Explain