Unit 11 Pointers
Unit 11 Pointers
Pointer definitions
int *myPtr;
definition
+ -
- ++
++ -- ! * & (type) right to left unary
• Call by reference
• If data is passed by reference, a pointer to the data is copied
instead of the actual variable as is done in a call by value.
Because a pointer is copied, if the value at that pointers address
is changed in the function, the value is also changed in main().
• Call by value • Call by reference