Videos: Arrays
slides: array.pdf |
These videos are about C arrays, including 2-dimensional arrays.
- Review and elaboration on how array declarations relate to pointers.
- When a function argument has an array type, the variable name acts even more like (i.e., exactly like) a pointer variable.
- Using typedef to declare new type names in C.
- Example C programs and the corresponding assembly code for a function that works on an array.
- How typedef interacts with array declarations, and how that helps make sense of the syntax and semantics for an array of arrays.
- An array of arrays defines a 2-dimensional array, and C defines them in a way that leads to a specific encoding of array indices.
- A C program and its corresponding assembly for accessing and iterating over elements of a 2-D array.
- A brief not on when an array dimension can be omitted from a function argument with a 2-D array type.
- Given the way that array indices are mapped to memory locations, we can reconstruct the dimensions of a pair of array declarations given the machine code that implements those dimensions.