can i know the source code for reversing a linked list with
out using a temporary variable?
Answer Posted / ruchi
void reverse()
{
nptr p;
int i=0;
p=start;
while(p->next!=NULL)
{
p=p->next;
i=i+1;
}
i++;
while(i)
{
printf("%d\n",p->num);
p=p->prev;
i--;
}
}
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Explain what is page thrashing?
What is floating point constants?
Why doesnt that code work?
Define the scope of static variables.
When should you not use a type cast?
What is adt in c programming?
What is the difference between arrays and pointers?
Explain logical errors? Compare with syntax errors.
can any one tel me wt is the question pattern for NIC exam
How do we open a binary file in Read/Write mode in C?
Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop
What is the purpose of & in scanf?
What is calloc in c?
What is a spanning Tree?
What is function in c with example?