In Summary
int v; //defines variable v of type int
int* p; //defines p as a pointer to int
p = &v; //assigns address of variable v to pointer p
v = 3; //assigns 3 to v
*p = 3; //assigns 3 to v
v = 3; is normal assignment of a value into a variable
*p = 3; indirect addressing
Previous slide
Next slide
Back to first slide
View graphic version