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
write a c program to calculate sum of digits till it reduces to a single digit using recursion
What are c header files?
An arrangement of information in memory in such a way that it can be easily accessed and processed by a programming language a) string b) data structure c) pointers d) array
Explain what are the different file extensions involved when programming in c?
How can I copy just a portion of a string?
What is pre-emptive data structure and explain it with example?
What is time null in c?
How old is c programming language?
What is hungarian notation? Is it worthwhile?
When should you use a type cast?
Differentiate between declaring a variable and defining a variable?
a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor
What is the purpose of macro in C language?
What is the time and space complexities of merge sort and when is it preferred over quick sort?
which is an algorithm for sorting in a growing Lexicographic order