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 is the right type to use for boolean values in c? Is there a standard type?
What is this pointer in c plus plus?
What is class and object in c?
how can use subset in c program and give more example
How to write a code for reverse of string without using string functions?
What are valid operations on pointers?
What are the advantages of using macro in c language?
What is n in c?
What is the purpose of sprintf?
What is wild pointer in c?
What are structure types in C?
What is a shell structure examples?
What is the sizeof () operator?
How can I trap or ignore keyboard interrupts like control-c?
What is array of pointers to string?