Pointer and “address-of”
10/09/98
8
B.Ramamurthy
Using typedef with pointer variables:
typedef int* PtrType;
PtrType P, Q;
Consider the sample:
int* P;
int X = 12;
P= X; /*this illegal since P cannot be assigned the value of X (but it can be assigned the address of X)*/
How? Using “address-of” operator &
P = &X;
Previous slide
Next slide
Back to first slide
View graphic version