can i know the source code for reversing a linked list with
out using a temporary variable?
Answer Posted / vishnu948923
struct node* reverse(struct node* first)
{
struct node* cur, temp;
cur=NULL;
while(first!=NULL)
{
temp=first;
first=first->link;
temp->link=cur;
cur=temp;
}
return cur;
}
Is This Answer Correct ? | 5 Yes | 5 No |
Post New Answer View All Answers
What tq means in chat?
Do pointers store the address of value or the actual value of a variable?
simple program of graphics and their output display
What is assert and when would I use it?
What is bubble sort in c?
What is the heap?
how to find anagram without using string functions using only loops in c programming
What is typedf?
Explain the advantages and disadvantages of macros.
What is the best style for code layout in c?
Program will then find the largest of three numbers using nested if-else statements. User is prompted to enter three numbers. Program will find the largest number and display it on the screen. All three numbers entered by the user are also displayed. If user enters 21, 33, and 5, the output should be as follows: You entered: 21, 33 and 5. The largest number is 33.
PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE
What are unions in c?
What does *p++ do? What does it point to?
What is structure and union in c?