Wondering if someone would take a look at this program and help me figure out why it's locking up when I compile it please? It is supposed to take the values and sort them using the bubble sort algorithm. It works fine if I don't use the "swap" function but that is a requirement for the question (as well as passing using pointers) and as soon as I put it in there, it locked up when I tried to compile. I'm not sure if I'm passing the data to it correctly maybe?
Exactly. Right now you are looping i in your bubblesort function but swap has no idea about that so you have to give it the value every time. Add it as you suggested and remove int i; from line 62.
Got it figured out. Thanks for the suggestions. They finally helped me figure out what I needed to do to get it to run correctly. Now I just have to figure out how to optimize it.