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)
- C operator a ? b : c
- C function pointers [fptr.c, funcptr.c]
- C library functions
- Standard I/O library
- stdio.h
- FILE *
- Full, line, buffering; unbuffered
- Moving around in a file fseek, ftell, fgetpos, fsetpos [stats.c, stats2.c]
- Character types [chartype.c]
- Time
- Number of seconds since the epoch (January 1, 1970, at 12:00:00am UTC)
- Getting it using time, ctime, localtime, gmtime [tick.c]
- Pseudorandom number generation
- Pseudorandom numbers vs. random numbers
- Pseudorandom number generators rand, random [prand1.c, prand2.c]
- Seeding a pseudorandom number generator [prand1.c]