Reverse array in C++
View Single Post
Yes, i++ is the same as i=i+1, but it's not the same as i=i++, which is what you had.
Try changing the last line to this, see if you can spot what's happening.
cout << a << endl << a[i] << endl;