Previous Lecture | Lecture 8 | Next Lecture |
Lecture 8, Thu 07/25
Pointers
Code from lecture
https://github.com/ucsb-cs16-m19/code-from-class/tree/master/07-25
Pointers
- Pointer declaration - difference/similarities with declaring basic types
- Accessing variables “indirectly” via pointers
- The address and indirection operators: “&” and “*”
- Pointers and arrays - similarities and dfferences
- Passing arrays to functions - specifically looking at how arrays degnerate to pointers on function calls.
Under the hood of function calls
- Function calls use the run-time stack, we’ll see how and why that’s important
- Review of pass by value
- Passing parameters to functions by address