Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


create an SINGLE LINKED LISTS and reverse the data in the
lists completely

Answers were Sorted based on User's Feedback



create an SINGLE LINKED LISTS and reverse the data in the lists completely..

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

create an SINGLE LINKED LISTS and reverse the data in the lists completely..

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

create an SINGLE LINKED LISTS and reverse the data in the lists completely..

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

Post New Answer

More C Interview Questions

Why is python slower than c?

0 Answers  


main() { intj; while9j<=10) { printf("\n%d",j); j=j+1; } }

4 Answers  


What is meaning of tree

0 Answers  


Where in memory are my variables stored?

0 Answers  


Explain how do you determine whether to use a stream function or a low-level function?

0 Answers  


What is methods in c?

0 Answers  


what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above

0 Answers  


How many bytes are occupied by near, far and huge pointers (dos)?

0 Answers  


what is difference b/w extern & volatile variable??

6 Answers   Teleca,


int a=20; int b=30; int c=40; printf("%d%d%d"); what will be the output?

5 Answers   CMC,


what will be the output of" printf("%d%d",scanf("%d% d",&a&b));"

4 Answers  


Is printf a keyword?

0 Answers  


Categories