Lecture 14: May 23, 2024

Reading: zyBooks text, §2.10, 2.19, 3.15, 5.12
Assignments: Homework 3, due May 29 (Note extension); Extra Credit 2, due May 29 (Note extension)

  1. C operator a ? b : c

  2. C function pointers [fptr.c, funcptr.c]

  3. C library functions

  4. Standard I/O library
    1. stdio.h
    2. FILE *
    3. Full, line, buffering; unbuffered
    4. Moving around in a file fseek, ftell, fgetpos, fsetpos [stats.c, stats2.c]

  5. Character types [chartype.c]

  6. Time
    1. Number of seconds since the epoch (January 1, 1970, at 12:00:00am UTC)
    2. Getting it using time, ctime, localtime, gmtime [tick.c]

  7. Pseudorandom number generation
    1. Pseudorandom numbers vs. random numbers
    2. Pseudorandom number generators rand, random [prand1.c, prand2.c]
    3. Seeding a pseudorandom number generator [prand1.c]

UC Davis sigil
Matt Bishop
Office: 2209 Watershed Sciences
Phone: +1 (530) 752-8060
Email: [email protected]
ECS 36A, Programming & Problem Solving
Version of May 29, 2024 at 12:01PM

You can also obtain a PDF version of this.

Valid HTML 4.01 Transitional Built with BBEdit Built on a Macintosh