Pointer Examples (contd.)
Q = new int;
Q
1000
2000
A new integer storage
address : 1000
?
*Q = 8;
Q
1000
2000
1000
8
//from previous slide
P
3000
x
6
3000
delete Q;
// what will happen?
Previous slide
Next slide
Back to first slide
View graphic version