Advanced C Programming

Fall 2017 :: ECE 264 :: Purdue University

This is for Fall 2017 (7 years ago) only.

Schedule

Week 1: 8/21
Overview, introductions
8/23
Programming environment, main(…), fputc(…)
snippets: fputc_simple.c
2.2 C Programs, pp. 31-33
8/25
Data types, ASCII, number bases, literals
snippets: data_types.c
1 Appendix D: Computing Number Systems, pp. 1033-1040
Week 2: 8/28
Strings, number bases, addresses
11 Strings, pp. 665-717
HW01: Debugging with GDB, due 8/29 (Tue)
8/30
Addresses, address syntax, memory layout
snippets: address_syntax.c
9 Pointers, pp. 558-585
9/1
Stack frames, examining memory using GDB
snippets: a.c
Week 3: 9/6
Memory layout, call stack
10.1-10.3 Arrays and Pointers; Pointer Arithmetic and Arrays; Passing an Array to a Function, pp. 611-626
9/8
Function addresses, structures
snippets: a.c b.c, c.c, d.c, e.c, f.c
12.1-12.3 The Type Definition; Enumerated Types; Structure, pp. 745-781
Week 4: 9/11
9/13
Struct objects in memory, examining memory with x/ and p/
12.3 Structure, pp. 753-781
9/15
Variadic functions, arrays, address arithmetic
office hours: gcc gdb.pdf
Week 5: 9/18
Exercise: Struct objects in memory, examining memory with x/ and p/
9/20
Quiz #1: struct objects in memory, examining bytes in memory
9/22
DRY rule, assert, test-driven development (TDD)
Week 6: 9/25
Intermediate GDB
HW06: Strings: mintf(…), due 9/26 (Tue)
9/27
9/29
Week 7: 10/2
HW07: Card shuffling #1 (E), due 10/6 (Fri)
10/4
DRY rule (review), homework, Quiz #3
snippets: duplication.c
10/6
Array of structures
Week 8: 10/11
Return by address, memory faults, address syntax
HW08: Card shuffling #2 (A), due 10/13 (Fri)
10/13
Files, fopen, fclose, fgetc
snippets: a.c a.txt, cat.c, yo.txt
Week 9: 10/16
HW09: Maze #1 (E), due 10/20 (Fri)
10/18
10/20
Multi-dimensional arrays on heap
Week 10: 10/23
NO CLASS
HW10: Maze #2 (E), due 10/27 (Fri)
10/25
NO CLASS
10/27
Multi-dimensional arrays on stack
Week 11: 10/30
Structure containing multi-dimensional array on heap... with one call (each) to malloc(…) and free(…)
HW11: Maze #3 (A), due 11/3 (Fri)
11/1
Linked lists, basics
11/3
Linked lists, exercise
Week 12: 11/6
Linked lists, recursive operations
HW12: Huffman #1 (E), due 11/10 (Fri)
11/8
Linked lists, freeing + qsort(…) with compare_fn
11/10
Week 13: 11/13
Huffman coding
HW13: Huffman #2 (E), due 11/17 (Fri)
11/15
11/17
Bitwise operations
snippets: exercise.c
Week 14: 11/20
Tree traversals
Week 15: 11/27
HW14: Huffman #3 (A), due 11/29 (Wed)
11/29
12/1
BMP image files: basics
exercise: bmp_images.pdf
Week 16: 12/4
HW15: Images (A), due 12/9 (Sat)
12/6
Error handling
12/8
REVIEW @ 7-9pm in EE 170 (no class @ 1:30pm)

To try code snippets, right-click to copy URL. Then, in bash, type wget URL (where URL is the URL you copied from this page.) To paste in PuTTY, try Shift-Right_Mouse_Click or Shift-Insert_Key. (Do not do that in Vim.)

Assignments and deadline may be changed without notice up to 1 week before the due date.