#include using namespace std; int nums[] = { 1, 5, 12, 19, 33, 42, 55, 58, 61, 63 }; const int N = sizeof(nums) / sizeof(int); void swap(int & a, int & b) // ampersands mean reference parameters { int temp = a; a = b; b = temp; } int main() { // print the array for (int i = 0; i < N; i += 1) cout << nums[i] << " "; cout << "\n"; // reverse the array for (int i = 0, j = N-1; j > i; i += 1, j -= 1) swap(nums[i], nums[j]); // print the array for (int i = 0; i < N; i += 1) cout << nums[i] << " "; cout << "\n"; }