summaryrefslogtreecommitdiff
path: root/2p18.cpp
blob: da97d0947492e854b24d96b608d2bfeeead0b64c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <iostream>

/*
 *
 * 2.18
 *
 *
 */

int main () {

	int myval = 10;
	int *point = nullptr;
	std::cout << "myval: " << myval << std::endl;
	point = &myval;
	*point = 1000;
	std::cout << "myval: " << myval << "\n*point: " << *point
			  << "\npoint: " << point << "\n&myval: " << &myval
			  << std::endl;
	
	return 0;
}