Lecture 9 Outline (October 14, 2015)

Reading: text §6


  1. Greetings and felicitations!
    1. The ECS 30 web hosting system (the system called “nob.cs.ucdavis.edu”) suffered a disk crash and is down. We do not know when it will be back up. All material has been uploaded to SmartSite.
    2. Homework #2 is available and due October 30
  2. Full program calc.c
  3. Pointers and indirection
    1. A pointer is an address
    2. Declarations
    3. Address (&), dereference (*) operators
    4. indirect references
    5. File pointers as an example (fileio.c)
  4. More on functions in C
    1. Parameters: pass (or call) by reference (also called output parameters)
    2. Example: swap function — exchange values of two variables (swap.c)
    3. Scope: local variables (scope.c)


You can also obtain a PDF version of this. Version of October 14, 2015 at 12:07PM