create an SINGLE LINKED LISTS and reverse the data in the
lists completely
Answers were Sorted based on User's Feedback
Answer / akansha sharma
create linklist, with node having DATA which contain
information and NEXT which cointain address of next node.
The pointer START pointing to first node of linklist. PREV
pointer point to first node(where START point) and TEMP
pointer which point at last node(by traversing).
Swap data of TEMP and PREV. Now increment TEMP(TEMP=TEMP-
>NEXT) and decreament TEMP.
Repeat this untill TEMP=PREV
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / vignesh1988i
dear sir ,
your logic might be incorrect , AND GIVE THE FULL PROGRAM SIR
sir you have told that TEMP pointer which point to the last
node.... ok ,for first you can swap the data.... ie STARTING
to TEMP. but how will you arrive at next pair of node for
swapping by decrementing the TEMP , ... a single linked
lists can travel only in one direction from HEAD till NULL
......
THANK U
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / praveen
Push all the elements into a stack (one by one) and then
create a new list by popping of the elements from the stack
| Is This Answer Correct ? | 0 Yes | 0 No |
What is %d called in c?
discuss the steps needed to get a program from source code to executable in a system?
write a method for an array in which it can display the largest n next largest value.
Why do we use static in c?
Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.
Can you explain the four storage classes in C?
Switch (i) i=1; case 1 i++; case 2 ++i; break; case 3 --i; Output of i after executing the program
Can we assign string to char pointer?
create a C program that displays one z,two y's,three x's until twenty six A's. plzz answer i need it tomorrow.
Explain logical errors? Compare with syntax errors.
write a program in c language to print your bio-data on the screen by using functions.
What is class and object in c?