Sep 19, 2014 at 8:39am
Line 3 in your first snippet doesn't do anything. when you realise this you can see they're the same. I think :)
Sep 19, 2014 at 12:11pm
In line 3, you are just putting the contents of array[count] into the integer val and returning val instead of array[count].
Sep 19, 2014 at 1:01pm
The difference is that one doesn't work, and the other almost works but gives in to the dark evil forces that add extra lines to people's code.
Sep 19, 2014 at 1:18pm
but they do the same thing do they not?
Sep 19, 2014 at 1:18pm
Unfortunately yes. It's just that the first one tried and failed whereas the second is simply wrong.
Last edited on Sep 19, 2014 at 1:18pm