Max Rees (they/them)

Lecturer, Department of Computer Science

Purdue University

Fall 2021 — CS 15900 LE4 (Tue/Thu 12:30 – 01:20 PM, FRNY G140)

Week Lecture Quiz Date Artifacts Topic
1 1 NONE Tue
24 Aug
Recording (50:11)
Slides (PDF)
Course overview; syllabus.
1 2 NONE Thu
26 Aug
Recording (49:21)
Slides (PDF)
Notes p. 61 – 67
Chapter 1. Model computer; CPU; types of memory; instruction cycle; natural, machine, and programming languages; programming workflow.
2 3 1 Tue
31 Aug
Recording (47:59)
Slides (PDF)
Notes p. 71 – 74
Chapter 2. C program structure; basic vi and *nix command-line usage; compiler warnings and errors; commenting.
2 4 2 Thu
02 Sep
Recording (51:21)
Slides (PDF)
Notes p. 74 – 79
Chapter 2 continued. C identifiers; data types; variables; constants (literal, symbolic/defined, memory); introduction to formatted I/O with the printf() function.
3 5 3 Tue
07 Sep
Recording (55:00)
Slides (PDF)
Notes p. 79 – 83
Chapter 2 continued. Formatted I/O using printf() and scanf(); types of errors.
3 6 4 Thu
09 Sep
Recording (49:41)
Slides (PDF)
Notes p. 83 – 88
Chapter 3. Expressions; operators; operands; operator precedence; simple and compound assignments; prefix and postfix increment and decrement; undefined behavior; mixed type expressions.
4 7 5 Tue
14 Sep
Recording (49:16)
Slides (PDF)
Notes p. 88 – 93
Chapter 3 continued. Implicit, explicit, and assignment type conversions; selection by calculation.
Chapter 4. Purpose of functions.
4 8 6 Thu
16 Sep
Recording (48:34)
Slides (PDF)
Notes p. 93 – 98
Chapter 4 continued. Function factoring; functional cohesion; calling function and called function; parameters; return values; function declarations and definitions; void functions; functions with no parameters and no return value; functions with no parameters that return a value.
5 9 7 Tue
21 Sep
Recording (48:57)
Slides (PDF)
Notes p. 98 – 103
Chapter 4 continued. Functions with parameters and no return value; functions with parameters that return a value; distinction between function declarations, calls, and definitions; usage of void type in parameter list.
5 10 8 Thu
23 Sep
Recording (49:41)
Slides (PDF)
Notes p. 104 – 112
Chapter 4 continued. Acceptable main() functions; parameter passing - pass by value and pass by address; scope; structure charts; recommended problem solving method; structured programming.
6 11 9 Tue
28 Sep
Recording (49:11)
Slides (PDF)
Notes p. 112 – 114
Chapter 5. Logical (boolean) data, logical expressions; C convention for true and false values;  logical operators: NOT (!), AND (&&), OR (||); truth tables; short-circuiting.
6 12 10 Thu
30 Sep
Recording (49:58)
Slides (PDF)
Notes p. 115 – 119
Chapter 5 continued. Relational and comparative operators; compound statements; operator binding; complements; structure chart and flowchart example for calculating a grade.
7 13 11 Tue
05 Oct
Recording (49:03)
Slides (PDF)
Notes p. 119 – 127
Chapter 5 continued. Two-way selection with if/else; nested selection; pasting into Vocareum; the conditional expression (ternary conditional operator); multi-way selection with if/else if/else.
7 14 12 Thu
07 Oct
Recording (47:18)
Slides (PDF)
Notes p. 126 – 131
Chapter 5 continued. Recap of if/else if/else behavior; independent if constructs; switch construct (including case labels and break statements); "fall-through" behavior of switch; comparing floating-point values for equality; when to use switch.
8 NONE NONE Tue
12 Oct
Canceled for Fall Break. Last day for office hours is Wed 06 Oct, resuming on Wed 13 Oct.
8 NONE NONE Thu
14 Oct
Canceled to account for Midterm #1 during Week 7.
9 15 13 Tue
19 Oct
Recording (49:09)
Slides (PDF)
Notes p. 132 – 137
Chapter 6. Loops and loop iterations, control expressions, initializations, updates, and control variables; structure chart and flowchart for exam average example; pre-test versus post-test looping constructs; factorial example; event-controlled versus counter-controlled processes.
9 16 14 Thu
21 Oct
Recording (48:05)
Slides (PDF)
Notes p. 137 – 143
Chapter 6 continued. Input validation as an event-controlled process; while loops; do-while loops; code for the earlier factorial example; nested loops and an example using factorials for ranges of numbers; infinite loops and forcing programs to exit using Ctrl-C.
10 17 15 Tue
26 Oct
Recording (50:16)
Slides (PDF)
Notes p. 143 – 148
Chapter 6 continued. Prohibition of control-forcing statements (break and continue); more on infinite loops; introduction to the C for loop and when to use it; beginning of the summative "sort the digits in a number" example: analysis, structure chart, and flowchart for the main function.
10 18 16 Thu
28 Oct
Recording (49:41)
Slides (PDF)
Notes p. 148 – 154
Chapter 6 continued. Lecture quiz questions on nested loops; getInput, ctZero, findMax, appendMax, and removeMax flowcharts for the "sorting the digits in a number" example; introduction to recursion: recursive cases and base cases; example of recursion with factorials.
11 19 17 Tue
02 Nov
Recording (50:57)
Slides (PDF)
Notes p. 154 – 163
Chapter 6 continued. Limitations of recursion (stack overflow); review of repetition techniques; brief mention of input/output redirection for the terminal command line. Chapter 8. Introduction to arrays: motivation, concept, declaration and definition, initialization and assignment.
11 20 18 Thu
04 Nov
Recording (48:46)
Slides (PDF)
Notes p. 163 – 169
Chapter 8 continued. Iterating over arrays with loops; going beyond the limits of an array in C; arrays across function boundaries: syntax and semantics of passing individual array elements by value and by address, and of passing entire arrays by address.
12 21 19 Tue
09 Nov
Recording (48:45)
Slides (PDF)
Notes p. 169 – 171
Chapter 8 continued. More on passing entire arrays to functions; handling of the array name as an address and the index as an offset with respect to that address (hence zero-based indexing); summary of passing various objects (variables, array elements, and arrays) by value and by address; printing or scanning entire arrays; introduction to efficient usage of arrays.
12 22 20 Thu
11 Nov
Recording (51:57)
Slides (PDF)
Notes p. 171 – 174
Chapter 8 continued. More efficiently reversing the order of elements in an array; introduction to sorting: method of swapping values, unsorted lists and sorted lists, and passes; algorithm for selection sort; algorithm for bubble sort.
13 23 21 Tue
16 Nov
Recording (48:54)
Slides (PDF)
Notes p. 175 – 181
Chapter 8 continued. Review of selection and bubble sorts; introduction of insertion sort; example bubble sort implementation; summary of sorting algorithms; introduction to searching: sequential search concept and implementation.
13 24 22 Thu
18 Nov
Recording (48:57)
Slides (PDF)
Notes p. 182 – 186
Chapter 8 continued. Solving questions regarding sorting algorithms; introduction to binary search: algorithm and implementation.
14 NONE NONE Tue
23 Nov
Canceled to account for Midterm #2 during Week 13. Last day for my office hours is Tue 23 Nov, resuming Tue 30 Nov. Last day for TA office hours is Mon 22 Nov, resuming Mon 29 Nov.
14 NONE NONE Thu
25 Nov
Canceled for Thanksgiving Break.
15 25 23 Tue
30 Nov
Recording (50:17)
Slides (PDF)
Notes p. 190 – 197
Chapters 9/10. Generalizing addresses and pointer variables from the pass-by-address technique using the address-of operator & and dereferencing/indirection operator *; pointer declaration/definition, initialization, and modification; relationship of arrays and pointers; pointer arithmetic and arrays; memory allocation for dynamically-sized arrays using the stdlib.h function malloc() and the sizeof operator.
15 26 24 Thu
02 Dec
Recording (42:48)
Slides (PDF)
Notes p. 197, 187 – 189
Chapters 8/9/10 continued. Final thoughts on malloc(); multidimensional arrays.
16 27 25 Tue
07 Dec
Recording (47:46)
Slides (PDF)
Notes p. 198 – 200
Chapter 11. Treating arrays of characters as "strings": syntax for string literals with double quotes; null terminator as a delimiter; using printf() to print a string with the %s placeholder; the unsafe use of scanf() with the bare %s placeholder and gets() to retrieve a string input from the user; the safe use of getchar() to retrieve a string input from the user.
16 28 26 Thu
09 Dec
Recording (49:20)
Slides (PDF)
Notes p. 200 – 203
Chapter 11 continued. More on getchar(); overview of the string.h functions: number of characters in a string (excluding the null terminator) using strlen(), making copies of strings using strcpy(), comparing strings for equality or for sorting purposes using strcmp().

My office hours: confirm availability on Brightspace calendar

My office hours for finals week:

TA office hours: confirm availability on Brightspace calendar

Programming assignments:

Exams:


Last modified on Thu 16 Dec 2021 10:26 PM EST.