What is printed out?
int arr[10] = { 5, 10, 15, 20, 25, 30, 35, 40, 45, 50 };
int* p; p = arr;
cout << *(p++) << ' ';
cout << *p << endl;
Also if:
int arr[10] = { 5, 10, 15, 20, 25, 30, 35, 40, 45, 50 };
int* p; p = arr+5;
cout << p[-1] << endl;
What is printed out? int arr[10] = { 5, 10, 15, 20, 25, 30, 35, 40, 45, 50 }; int* p; p = arr; cout << *(p++) << ' '; co
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am