Lesson 2: A Structured Construction
Outline:
- Programming in C
- review: basics
- handling command-line arguments:
args.c
- Representing data
- bases: decimal, binary, hex
- conversions: binary to decimal/hex
- numerical types:
char,short,int,long,float,double - “strings” in C
- C Structs
- overview
- example:
struct.c - memory layout
- Mixing structs and arrays
- example:
struct_array.c - memory layout
- example:
- Assignment 2 - due Friday night!
- assignment overview
- file I/O:
character_counter.c,line_counter.c,line_counter_debug.c - questions?
- Syllabus: read it and post questions on Slack by Friday
Reading assignment (to be completed by the next class):
- Syllabus
- DiS Sec. 4.1.1-4.1.3: Number Bases
- DiS Sec. 4.2: Converting Between Bases
- DiS Sec. 1.6: Structs