Timeline for Pset 3 sort function won't swap
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 8, 2015 at 16:28 | comment | added | kenlenney | I tested it with generate.c and it worked!!!!! Still don't know why GDB is printing 5 for every value though | |
Dec 8, 2015 at 16:27 | vote | accept | kenlenney | ||
Dec 8, 2015 at 15:32 | comment | added | kenlenney | just did that like 5 sec ago, tks u so much for your answers and suggestions | |
Dec 8, 2015 at 15:29 | comment | added | kzidane | @kenlenney you may update your original question with the updated code! | |
Dec 8, 2015 at 15:27 | comment | added | kenlenney | Yes I did...... | |
Dec 8, 2015 at 15:07 | comment | added | kzidane | @kenlenney did you save your modified source code and recompile? | |
Dec 8, 2015 at 14:39 | comment | added | kenlenney | Thank you so much, after reading your answer, I changed 'min=i', and in the second loop, 'if (values[j] < values[min])', then 'min=j'. This way, for everytime the second loop iterate, if the condition is true, it'll update the smaller value and use that value to compare with values[j], but it still get the same result when I run GDB where every value is 5, pls help. again | |
Dec 8, 2015 at 14:05 | history | answered | kzidane | CC BY-SA 3.0 |