Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "pch.h"
- #include <iostream>
- using namespace std;
- int main()
- {
- const int n = 10;
- int test = 2607;
- int test1 = -1;
- int a[n] = { 0 };
- cout << "&test=" << &test << " &imin=" << &test1 << endl;
- cout << "&a[0]=" << &a[0] << " &a[n-1]=" << &a[n - 1] << endl;
- cout << "&a[n-1+5]=" << &a[n - 1 + 6] << endl;
- cout << "VALUE: test=" << test << endl;
- cout << "VALUE: a[n-1+6]=" << a[n - 1 + 6] << endl;
- a[n - 1 + 6] = 3040;
- cout << "VALUE: test=" << test << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment