Lecture 7 Outline (October 9, 2015)

Reading: text § 3


  1. Greetings and felicitations!
    1. Note that you need not do problem 10391 in Section 5.6 of MyProgrammingLab (question 5 on the homework)
    2. Go through submitting homework
  2. How to write a program
    1. Program: calculator that does +, -, *, /, %
    2. Take it to design — then modularize
  3. Functions in C
    1. Parameters: pass (or call) by value
    2. Arguments: instantiations of parameters matched in order
    3. Return values
    4. Scope: local variables
    5. Show the program stack and how it relates to functions
  4. switch statement
  5. Then translate to C


You can also obtain a PDF version of this. Version of October 8, 2015 at 9:57PM