Lesson 2: Adding a Little Character
Outline:
- Representing data
- bits and bytes
- memory
- C strings and arrays
char
s andchar
arrays- example:
strings.c
- Pointers
*
vs.&
- arrays and pointers
- Two-dimensional arrays
- layout in memory (row-major order)
- connection to C strings and files
- example:
arrays2d.c
- Recap: Assignment 1
- assignment overview
- problem decomposition
- questions?
- Syllabus: read it and post questions on Slack by Friday
Reading assignment (to be completed by the next class):
- Syllabus
- Pointer basics (Stanford)
- Bryant & O’Halloran Sec. 2.1.1–2.1.4 (p. 34–49)
Soon, take a look at The 5-Minute Guide to C Pointers by Dennis Kubes. If you don’t read this now, try it out this weekend.