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
What are data types in c language?
Explain what is the benefit of using an enum rather than a #define constant?
what is stack , heap ,code segment,and data segment
Can we declare variable anywhere in c?
What is a pointer in c plus plus?
What is #include called?
Why is c called c?
How do you convert strings to numbers in C?
Is that possible to add pointers to each other?
What does *p++ do?
How can I do graphics in c?
What are two dimensional arrays alternatively called as?
How can I discover how many arguments a function was actually called with?
What is difference between stdio h and conio h?
What is the maximum length of an identifier?