please give the program for sorting a linked list without affecting the original value
alamu 0 Newbie Poster
Recommended Answers
Jump to PostNobody is going to do your homework for you. But I'll give you a push in the right direction. You essentually have two options:
- Build a new list in sorted order while traversing the old list.
- Sort the old list into a new list.
It's a fairly subtle difference …
Jump to PostClearly you didn't read my post (probably because I didn't give you a full working program), because I explained exactly how to do it in two different ways.
Jump to Postyou need to modify only pointer "next", do you know what linked list is? If you know then you can draw something that you whant to do with it and then program this behaviour
Jump to Posti wonder how did u become administrator without having any basic knowlege of c language ?
The two are unrelated. But if you want to discuss aspects the C language or standard library, I'll be happy to school you in a debate.
now just get lost from …
Jump to Postmoderator eyes have stopped completely working
@ra527: Even after having been banned twice, why do you insist on posting such rude comments? You still have a lot to learn, not just about programming (your code is sloppy at best) but also on how to behave.
All 39 Replies
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
alamu 0 Newbie Poster
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
Sokurenko 42 Junior Poster
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
raj527 0 Newbie Poster
raj527 0 Newbie Poster
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
alamu 0 Newbie Poster
alamu 0 Newbie Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
ra527 0 Newbie Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
ra527 0 Newbie Poster
_avishek 29 For as long as space endures
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
milkshek -5 Newbie Poster

I_m_rude
alamu 0 Newbie Poster

I_m_rude
alamu 0 Newbie Poster
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
jameslowde 0 Newbie Poster
optimus_prime_1 -6 Newbie Poster
optimus_prime_1 -6 Newbie Poster
nndung179 0 Light Poster
gaandu_danibeb 0 Newbie Poster
satya_19 -10 Newbie Poster
Schol-R-LEA commented: You do understand that this post was from 8 years ago, right? -3
tinstaafl commented: and is C code not c++ -3
Salem commented: twit -4
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.