Outline for April 4, 2023

Reading: zyBooks §1, 2.1–2.8, 2.11–2.14, 2.16, 2.18, 2.20; Handouts: 3, 4
Due: Homework #1, due April 15, 2024

  1. Example program 2: fahr1.c
    1. Program (main, return or exit for main)
    2. Declarations (int, register int)
    3. Body (while, printf)

  2. Variable names

  3. Basic types
    1. int, long vs. short, unsigned vs. signed
    2. char, treated like an int that holds 1 character
    3. float, double
    4. Type casting

  4. Basic operators
    1. arithmetic: +, , *, /, %
    2. % defined so that n % p = r implies n = ap + r for some a
    3. 5 % −2 can be 1 (5 = (−2) × (−2) + 1) or −1 (5 = (−3) × (−2) + (−1))

  5. Associativity of operations
    1. Difference between associativity of operations and order of evaluation

Papers

  1. Processes and the Shell, processes.pdf
  2. Compiling and Executing Your Program, compiling.pdf

UC Davis sigil
Matt Bishop
Office: 2209 Watershed Sciences
Phone: +1 (530) 752-8060
Email: mabishop@ucdavis.edu
ECS 36A, Programming & Problem Solving
Version of April 4, 2024 at 12:32PM

You can also obtain a PDF version of this.

Valid HTML 4.01 Transitional Built with BBEdit Built on a Macintosh