Outline for April 16 and 18, 2024

Reading: zyBooks text §5.12, 6.5–6.10
Due: Homework #1, due April 18, 2024

  1. Pointers and Arrays
    1. Arrays as pointers
    2. How indexing works
    3. Arrays as function parameters
    4. Multi-dimentional arrays

  2. More on arrays
    1. Initializations
    2. Contrast with pointer initialization

  3. C arrays and strings
    1. String representation: array of chars terminated by NUL (ASCII ‘\0’)
    2. gets(buf), fgets(buf, size, fp) [bad.c, good.c]
    3. Array of strings (pointers to characters)

  4. Example: ptrstew.c

  5. C arrays and strings
    1. Strings as arguments to functions [strcpy.c]
    2. Various idioms

  6. C characters
    1. Types of characters; include file ctype.h [chartype.c, dasc.c]
    2. Characters as integers and vice versa [caesar-enc.c, caesar-dec.c]

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 18, 2024 at 9:27PM

You can also obtain a PDF version of this.

Valid HTML 4.01 Transitional Built with BBEdit Built on a Macintosh