Computer Programming (9) - Arrays


administrivia

Web Page - http://www.cs.tau.ac.il/~efif/courses/ComputerProgramming


last week…


also last week…


arrays


what is an array?


example


scores example


how can we do that?


so look at this example


array declaration


array declarations


initialization


more about initialization


but what does this do?


what can we do with arrays?


array elements


subscript expression


address of first element


The Rule


example


our story so far…


array recap: array declarations


array recap: array definitions


array declaration examples


array recap: using arrays


array recap: subscript expression


array recap: subscript expression


subscript expression examples


array recap: array name as pointer


so now back to our example


passing arrays


passing arrays


functions with array arguments


arrays and pointers


say what?


pointers again


pointer arithmetic


pointer addition


the logic of pointer addition


pointer addition and array indexing


pointer addition and array indexing


some more details of pointer addition


back to that locker analogy

lectures prev top next
Maintained by Efi Fogel. Last modified: January 25 2003.