Write a program to reverse a linked list?
Answer Posted / surendra
suppose p is the head pointer.
r=NULL;
while(p)
{
q=r;
r=p;
p=p->next;
r->next=q;
}
p=r;
Is This Answer Correct ? | 16 Yes | 7 No |
Post New Answer View All Answers
Define the process of handling in case of destructor failure?
total amount of milk produced each morning and then calculates and outputs the number of cartons needed for this milk , the cost of producing the milk and the profit from producing this milk.
What is c++ library?
Explain the benefits of proper inheritance.
Is it legal in c++ to overload operator++ so that it decrements a value in your class?
What is while loops?
Is c++ vector dynamic?
Is dev c++ a good compiler?
what is scupper?
Explain abstraction.
What do you mean by funtion prototype?
Write about the role of c++ in the tradeoff of safety vs. Usability?
What is the use of function pointer?
Explain polymorphism?
How long does it take to get good at leetcode?