hi guys, this is my first post to the forum although i do use this website regularly for help. now i have a problem with my code for a sorting program i am making.
basically the program is used to make a random number list and then you should be able to sort the list using bubble sort, merge sort, heap sort and a tree based sort (i have no idea how to implement the last two of these)
i am a beginner at c and my code might be a mess but any help would be greatly appreciated.
a problem i am having is -
when i open the program and create the random numbers and then do a bubble sort, all is well and everything gets sorted properly. but then when i close the program and re open it and then do a bubble sort on the same set of numbers, for some reason, the sorted list has a new entry of 0.000... at position 1
its as if i have to insert a -1 somewhere so that it deletes this first value but i don't know where, and also why this problem only occurs when i re open the program.
(there is no problem when merge sort tries to do this by the way)
i will insert the code in the next post.
thanks