These videos about C, pointers, and number representations should be mostly review, but they touch on things that will be important specifically for this course. Most days won’t have so many vidoes as this review.
- How to compile an run simple C programs, including the way that Unix programs report success and failure.In the videos, I use Emacs as a text editor. There are many good choices for editors. You can also use clang as the C compiler instead of gcc, but we will use gcc to compile and run your assignments.
- Intro C: 2 Addresses 4:18C variables and their addresses, leading up to pointers.
- Intro C: 3 Pointers 4:29Creating, reading from, and writing to pointers.
- Intro C: 4 Arrays 2:28Arrays in C, and how they relate to pointers.
- Intro C: 5 Strings 6:27Strings are arrays of characters terminated with a 0 byte. Arrays of arrays of strings are relevant for handling command-line arguments.
- How and why adding to a pointer changes the address in a type-specific way.
- Intro C: 7 for loops 0:38A brief note on for loops and functions in C.
- Numbers: 1 Integers 2:55Signed an unsigned integers at various sizes.The slides in the video include an obvious typo: int has 32 bits, not 16. The slides are corrected in PDF form.
- C operations for booleans and for manipulating the bits of an integer.The video omits the ^ bitwise “XOR” (for “exlcusive or”) operator, but an example has been added to the PDF slides at page 49-50.
- Arithmetic overflow, coercions between sizes and signs, and the C specification.
- IEEE-standard encoding of floating-point numbers.Here’s the key summary slide by itself: floating-point quick reference.
- Trying out the results from the previous video on some example bit patterns.You should be able to perform this kind of decoding on a quiz or exam, especially for small values of k and n.
- Strings, again, but also some examples of viewing bits as various types through casts and copies.
- Some terminology and guidance about integer sizes according to C standards and in practice.
- Examples of common ways to be confused about floating-point numbers, integer arithmetic, pointers, and compiler-optimization modes.