The loop in reverse( ) never stores a new value of temp after the initial value. How can this reverse the full array (or subset)?
And, this is C code, not C++. Please use the correct forum.
Reputation Points: 1268
Solved Threads: 228
Posting Virtuoso
Offline 1,895 posts
since Aug 2007