that a stack is a LIFO (last-in-first-out) data structure
that a stack is a useful data structure for any data that needs
to be processed in reverse order
that a stack is often used to implement function calls/returns
that C supports multi-dimensional arrays (arrays of arrays)
that arrays are stored in row-major order in C
that programs can be made to run more efficiently by exploiting locality
that when a two-dimensional array is passed as a parameter, the number
of columns must also be passed to ensure that C can calculate the address of
each array element
BE ABLE TO:
implement the stack operations (push, pop, isEmpty) using a linked list
use a stack to solve various problems
list the information that is stored in a function's activation record
write C code to process each element of a two-dimensional array
define spatial locality and temporal locality
write code that accesses elements of an array so that the code exploits
spatial locality and temporal locality
Sample Quiz Questions:
Rewrite the loop in the following code so that it accesses the array
using pointer notation instead of using square-bracket notation
int list[5][10], i;
int *pList;
pList = list;
// set the 0th element of each row to i
for (i=0; i<5; i++)
list[i][0] = i;