1#include <iostream>
2
3using namespace std;
4const int MAX = 3;
5
6int main () {
7 int var[MAX] = {10, 100, 200};
8 int *ptr[MAX];
9
10 for (int i = 0; i < MAX; i++) {
11 ptr[i] = &var[i]; // assign the address of integer.
12 }
13
14 for (int i = 0; i < MAX; i++) {
15 cout << "Value of var[" << i << "] = ";
16 cout << *ptr[i] << endl;
17 }
18
19 return 0;
20}