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
Multiply an Integer Number by 2 Without Using Multiplication Operator
Which of the following operators is incorrect and why? ( >=, <=, <>, ==)
largest Of three Number using without if condition?
Describe the order of precedence with regards to operators in C.
What is the modulus operator?
What are 3 types of structures?
What does stand for?
Discuss the function of conditional operator, size of operator and comma operator with examples.
Do pointers take up memory?
What is action and transformation in spark?
How can I read a binary data file properly?
What is const keyword in c?
Explain what are compound statements?
Tell me when is a void pointer used?
How can I make sure that my program is the only one accessing a file?