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
How can this be legal c?
When should a far pointer be used?
write an algorithm to display a square matrix.
Explain the difference between the local variable and global variable in c?
Is a pointer a kind of array?
What is dynamic memory allocation?
What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers
Explain what is the difference between functions abs() and fabs()?
Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?
Explain threaded binary trees?
Explain 'bus error'?
What is c mainly used for?
What is gets() function?
WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER
a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list