CS201 Pointer Problems Date: _________ Name:__________________________

int x;
int y;
int *p;

x=5;
y=2;
p=&x;
++p;
*p = 7;
cout<<x<<y;
Output

Symbol Table
Name Address Size















1000



1002



1004



1006



1008



1010



1012



1014




int a;
int b;
int *p;
int *q;

a=2; b=5;
p=&a;
q=p;
++q;
*q = 6;
*p = 3;
cout<<a<<b;
Output


Symbol Table
Name Address Size















1000



1002



1004



1006



1008



1010



1012



1014





int x;
int y;
int *p;

x=1;
y=2;
p=&x;
++p;
*p = x +3;
cout<<x<<y;
Output

Symbol Table
Name Address Size
















1000



1002



1004



1006



1008



1010



1012



1014





int x;
int y;
int *p;
int *q;
int r;
x=5; y=6;
p=&x;
++p;
q = p;
r = *q;
r = *p + *q;
cout<<x<<y<<r;
Output

Symbol Table
Name Address Size
















1000



1002



1004



1006



1008



1010



1012



1014