My lectures: view lecture schedule in the table below
My office hours: check Brightspace announcements for cancellations
TA office hours: check Brightspace announcements for room changes / cancellations
Chapter 1 lectures by William Crum:
| Week 1 | ||||||||
| Mon 21 Aug | Tue 22 Aug | Wed 23 Aug | Thu 24 Aug | Fri 25 Aug | Sat 26 Aug | Sun 27 Aug | ||
| Lecture 1 (48:47) | Lecture 2 (48:57) | |||||||
| No Lecture Quiz | Lecture Quiz Demo | |||||||
| Slides | No notes | Slides | p. 31 – 35 | |||||
| Overview of the class; course policies; motivations. | Chapter 2. C program structure and syntax; comments; identifiers. | |||||||
| Complete Lab 0 + take Lab Quiz 0 | ||||||||
| Week 2 | ||||||||
| Mon 28 Aug | Tue 29 Aug | Wed 30 Aug | Thu 31 Aug | Fri 01 Sep | Sat 02 Sep | Sun 03 Sep | ||
| Lecture 3 (50:24) | Lecture 4 (48:38) | |||||||
| Lecture Quiz 1 | Lecture Quiz 2 | |||||||
| Slides | p. 35 – 37 | Slides | p. 37 – 42 | |||||
Chapter 2 continued. Data types: int family, including short, long, and long long. Character data type (char) and ASCII table; boolean data type (bool); floating-point data types (float, double, long double); variables: declaration, definition, and initialization; uninitialized variables and undefined behavior; constants: literal constants, symbolic/defined constants, memory constants. |
Chapter 2 continued. Formatted input/output: printf format string and data list; format string placeholders: code, size, precision, (minimum) width, and flag; variations of the minimum width modifier for printf() placeholders; usage of scanf() for user input. |
|||||||
| Start Homework 1 | ||||||||
| Start Lab 1 (overview) + take Lab Quiz 1 | ||||||||
| Week 3 | ||||||||
| Mon 04 Sep | Tue 05 Sep | Wed 06 Sep | Thu 07 Sep | Fri 08 Sep | Sat 09 Sep | Sun 10 Sep | ||
| No classes or office hours (Labor Day) |
Lecture 5 (50:51) | Lecture 6 (50:19) | ||||||
| Lecture Quiz 3 | Lecture Quiz 4 | |||||||
| Slides | p. 42 – 46 | Slides | p. 46 – 49 | |||||
Chapter 2 continued. Types of errors: compile-time errors (including syntax errors and the difference between gcc's "errors" and "warnings"), and run-time errors (including crashes such as segmentation faults and floating point exceptions, and logical errors); debugging with diagnostic printf() statements.Chapter 3. Expressions; operators; operands; operator precedence; simple and compound assignments. |
Chapter 3 continued. Prefix and postfix increment and decrement; side effects and sequence points; undefined behavior; single data type and mixed data type expressions; implicit data type conversions (safe) and hierarchy of data types by relative size; explicit data type conversions (can be unsafe) using "type casting" operators; rounding versus truncation with regards to floor(), (int) casts, and printf() precision modifiers. |
|||||||
| Homework 1 due 11:00 PM | Start Homework 2 | |||||||
| Lab 1 due 30 minutes before lab period | ||||||||
| Start Lab 2 (overview) + take Lab Quiz 2 | ||||||||
| Week 4 | ||||||||
| Mon 11 Sep | Tue 12 Sep | Wed 13 Sep | Thu 14 Sep | Fri 15 Sep | Sat 16 Sep | Sun 17 Sep | ||
| Lecture 7 (48:30) | Lecture 8 (48:26) | |||||||
| Lecture Quiz 5 | Lecture Quiz 6 | |||||||
| Slides | p. 50 – 52 | Slides | p. 53 – 56 | |||||
Chapter 3 continued. Assignment data type conversions (can be unsafe); immutability of object data types; what causes the value of a variable to change (simple or compound assignment operators, scanf(), or prefix/postfix increment/decrement operators); selection by calculation with examples, including the "scaling to zero or one" formula. |
Chapter 4. Purpose of functions; function factoring; functional cohesion; calling function and called function; parameters; return values; function declarations, calls, and definitions; void functions; functions with no parameters and no return value (static output). |
|||||||
| Lab 2 due 30 minutes before lab period | ||||||||
| Start Lab 3 (overview) + take Lab Quiz 3 | ||||||||
| Week 5 | ||||||||
| Mon 18 Sep | Tue 19 Sep | Wed 20 Sep | Thu 21 Sep | Fri 22 Sep | Sat 23 Sep | Sun 24 Sep | ||
| Lecture 9 (48:14) | Lecture 10 (48:22) | |||||||
| Lecture Quiz 7 | Lecture Quiz 8 | |||||||
| Slides | p. 57 – 64 | Slides | p. 64 – 68 | |||||
Chapter 4 continued. Functions with no parameters that return a value (input); functions with parameters that return a value (calculation); functions with parameters and no return value (dynamic output); differences between function declarations, calls, and definitions; acceptable main() functions. |
Chapter 4 continued. Parameter passing: pass-by-value and pass-by-address; address operator & and dereferencing operator *; pointers and pointer types; swapping the value of two variables. |
|||||||
| Homework 2 due 11:00 PM | Start Homework 3 | |||||||
| Lab 3 due 30 minutes before lab period | ||||||||
| Start Lab 4 (overview) + take Lab Quiz 4 | ||||||||
| Week 6 | ||||||||
| Mon 25 Sep | Tue 26 Sep | Wed 27 Sep | Thu 28 Sep | Fri 29 Sep | Sat 30 Sep | Sun 01 Oct | ||
| Lecture 11 (46:27) | Lecture 12 (47:14) | |||||||
| Lecture Quiz 9 | Lecture Quiz 10 | |||||||
| Slides | p. 68 – 72 | Slides | p. 72 – 76 | |||||
| Chapter 4 continued. Final thoughts on scope (local and global, for variables and functions respectively); structure charts: format, rules, good and bad examples; recommended problem-solving method (specify, analyze, design, code, test and debug, refine); overview of the current position in the class's content: just finished sequence with chapter 4; next is selection in chapter 5; then repetition in chapter 6. | Chapter 5. Logical data (true or false); logical expressions; C convention for true and false values ("truthiness"); logical operators: NOT (!), AND (&&), OR (||); truth tables; short-circuiting; simple examples of logical NOT, AND, and OR; examples of short-circuiting with side effects; relational operators (< <= > >=) and equality operators (== !=); compound statements. |
|||||||
| Lab 4 due 30 minutes before lab period | ||||||||
| Start Lab 5 (overview) + take Lab Quiz 5 | ||||||||
| Week 7 | ||||||||
| Mon 02 Oct | Tue 03 Oct | Wed 04 Oct | Thu 05 Oct | Fri 06 Oct | Sat 07 Oct | Sun 08 Oct | ||
| Lecture 13 (50:53) | Lecture 14 (48:59) | |||||||
| Lecture Quiz 11 | Lecture Quiz 12 | |||||||
| Slides | p. 76 – 78, 80 – 81 | Slides | p. 81 – 86 | No office hours (Fall Break) | ||||
Chapter 5 continued. Logical complements and examples thereof; two-way selection using the if/else construct. |
Chapter 5 continued. More examples of if/else; nested selection with if/else; "dangling else" logical error; two-way selection using the conditional expression (also known as the ternary conditional operator); multi-way selection using if/else if/else. |
|||||||
| Homework 3 due 11:00 PM | Start Homework 4 | |||||||
| Lab 5 due 30 minutes before lab period | ||||||||
| Start Lab 6 + take Lab Quiz 6 | ||||||||
| Week 8 | ||||||||
| Mon 09 Oct | Tue 10 Oct | Wed 11 Oct | Thu 12 Oct | Fri 13 Oct | Sat 14 Oct | Sun 15 Oct | ||
| Lecture 15 (47:48) | ||||||||
| Lecture Quiz 13 | ||||||||
| Slides | p. 87 – 89 | |||||||
| No classes or office hours (Fall Break) | Chapter 5 continued. Final thoughts on if/else if/else; switch construct: case labels and break statements; "fall-through" behavior of switch; comparing floating-point values for equality. |
|||||||
| Lab 6 due 30 minutes before lab period | ||||||||
| Start Lab 7 (overview) + take Lab Quiz 7 | ||||||||
| Midterm 1: 08:00 – 09:00 PM, Hall of Music | ||||||||
| Week 9 | ||||||||
| Mon 16 Oct | Tue 17 Oct | Wed 18 Oct | Thu 19 Oct | Fri 20 Oct | Sat 21 Oct | Sun 22 Oct | ||
| Lecture 16 (51:21) | Lecture 17 (49:29) | |||||||
| Lecture Quiz 14 | Lecture Quiz 15 | |||||||
| Slides | p. 90 – 92, 95 – 96, 98 | Slides | p. 98, 97, 99 – 103 | |||||
Chapter 5 continued. C language rules for switch; when and how to use switch.Chapter 6. Repetition using loops: loop control expression (LCE), loop control variable (LCV), loop initialization and loop update, loop iterations; pre-test versus post-test looping constructs: the minimum number of iterations and when to use each; tabular strategy for analyzing looping code; while and do-while loops. |
Chapter 6 continued. Event-controlled versus counter-controlled processes; input validation as a event-controlled process using a post-test looping construct; implementation of the factorial example; infinite loops and forcing programs to exit using Ctrl-C. |
|||||||
| Homework 4 due 11:00 PM | Start Homework 5 | |||||||
| Lab 7 due 30 minutes before lab period | ||||||||
| Start Lab 8 (overview) + take Lab Quiz 8 | ||||||||
| Week 10 | ||||||||
| Mon 23 Oct | Tue 24 Oct | Wed 25 Oct | Thu 26 Oct | Fri 27 Oct | Sat 28 Oct | Sun 29 Oct | ||
| Lecture 18 (50:13) | Lecture 19 (49:21) | |||||||
| Lecture Quiz 16 | Lecture Quiz 17 | |||||||
| Slides | p. 103 – 106 | Slides | p. 113 – 115 | |||||
Chapter 6 continued. Infinite loop examples; introduction to the C for loop and when to use it; examples of rewriting while loops into for loops. |
Chapter 6 continued. Introduction to recursion: recursive cases and base cases; example of recursion with factorials; limitations of recursion (stack overflow); review of repetition techniques. | |||||||
| Lab 8 due 30 minutes before lab period | ||||||||
| Start Lab 9 (overview) + take Lab Quiz 9 | ||||||||
| Week 11 | ||||||||
|
Chapter 6 notes p. 93 – 94: minimum, maximum, and average for an arbitrary number of exam scores. Only a single loop is necessary: the input loop, which updates the current minimum, maximum, sum, and count of scores. When the user enters The concept of a sentinel in the input is also used on Homework 6. |
||||||||
|
Chapter 6 notes p. 107 – 112: sorting digits in a number from largest to smallest, creating as a result the largest possible number from those digits. Repetitive processes:
|
||||||||
| Mon 30 Oct | Tue 31 Oct | Wed 01 Nov | Thu 02 Nov | Fri 03 Nov | Sat 04 Nov | Sun 05 Nov | ||
| Lecture 20 (49:28) | Lecture 21 (48:45) | |||||||
| Lecture Quiz 18 | Lecture Quiz 19 | |||||||
| Slides | p. 116 – 120 | Slides | p. 120 – 127 | |||||
| Chapter 8. Introduction to arrays: motivation, concept, declaration and definition, initialization and assignment; iterating over arrays with loops. | Chapter 8 continued. Going beyond the limits of an array; arrays across function boundaries: syntax and semantics of passing individual array elements by value and by address, and of passing entire arrays by address; 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, by address, and using the return keyword; printing or scanning entire arrays. |
|||||||
| Homework 5 due 11:00 PM | Start Homework 6 | |||||||
| Lab 9 due 30 minutes before lab period | ||||||||
| Start Lab 10 (overview) + take Lab Quiz 10 | ||||||||
| Week 12 | ||||||||
| Mon 06 Nov | Tue 07 Nov | Wed 08 Nov | Thu 09 Nov | Fri 10 Nov | Sat 11 Nov | Sun 12 Nov | ||
| Lecture 22 (50:41) | Lecture 23 (49:57) | |||||||
| Lecture Quiz 20 | Lecture Quiz 21 | |||||||
| Slides | p. 128 – 130 | Slides | p. 131 – 135 | |||||
| Chapter 8 continued. Introduction to efficient usage of arrays: 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. | Chapter 8 continued. Finishing up selection sort; algorithm and code for bubble sort; algorithm for insertion sort; summary of sorting algorithms. | |||||||
| Lab 10 due 30 minutes before lab period | ||||||||
| Start Lab 11 (overview) + take Lab Quiz 11 | ||||||||
| Week 13 | ||||||||
| Mon 13 Nov | Tue 14 Nov | Wed 15 Nov | Thu 16 Nov | Fri 17 Nov | Sat 18 Nov | Sun 19 Nov | ||
| Midterm 2: 08:00 – 09:30 PM, Hall of Music | Lecture 24 (48:50) | Lecture 25 (50:12) | ||||||
| Lecture Quiz 22 | Lecture Quiz 23 | |||||||
| Slides | p. 147 – 150 | Slides | p. 150 – 154 | |||||
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. |
Chapters 9 & 10 continued. Pointer arithmetic and arrays; memory allocation for dynamically-sized arrays using the stdlib.h function malloc() and the sizeof operator.The answer to the second lecture quiz question can be found in this 6 minute video. |
|||||||
| Homework 6 due 11:00 PM | Start Homework 7 | |||||||
| Lab 11 due 30 minutes before lab period | ||||||||
| Start Lab 12 (overview) + take Lab Quiz 12 | ||||||||
| Week 14 | ||||||||
| Mon 20 Nov | Tue 21 Nov | Wed 22 Nov | Thu 23 Nov | Fri 24 Nov | Sat 25 Nov | Sun 26 Nov | ||
| No classes or office hours (Thanksgiving break) | ||||||||
| Week 15 | ||||||||
| Mon 27 Nov | Tue 28 Nov | Wed 29 Nov | Thu 30 Nov | Fri 01 Dec | Sat 02 Dec | Sun 03 Dec | ||
| Lecture 26 (46:37) | Lecture 27 (48:18) | |||||||
| Lecture Quiz 24 | Lecture Quiz 25 | |||||||
| Slides | p. 136 – 139 | Slides | p. 139 – 143 | |||||
| Chapter 8 continued. Solving problems using sorting algorithms; introduction to searching: sequential search concept and implementation; introduction to binary search. Note: the recording is from my 1:30 section. Lecture quiz questions 1 and 2 were over selection and bubble sort. Check out this recording (11:23) to review lecture quiz question 3 (insertion sort) from my 2:30 section. There is also a template you can use to solve these questions. |
Chapter 8 continued. More sorting questions; binary search: algorithm, examples, and implementation. Note: the recording is from my 2:30 section, in which we did lecture quiz questions 2 and 3. Check out this recording (11:20) to review lecture quiz question 1 from my 1:30 section. |
|||||||
| Homework 7 due 11:00 PM | ||||||||
| Lab 12 due 30 minutes before lab period | ||||||||
| Attend Lab 13 | ||||||||
| Lab Quiz 13 due 11:00 PM | ||||||||
| Quiet period (week 16) | ||||||||
| Mon 04 Dec | Tue 05 Dec | Wed 06 Dec | Thu 07 Dec | Fri 08 Dec | Sat 09 Dec | Sun 10 Dec | ||
| Lecture 28 (50:11) | Office hours 1:30 – 3:30 PM MATH 175 |
|||||||
| Lecture Quiz 26 | ||||||||
| Slides | p. 144 – 146 | |||||||
| Chapter 8 continued. Multidimensional arrays: concept and motivation, declaration/definition, initialization, usage. Note: the recording is from my 1:30 section, in which we did lecture quiz questions 1 – 3. In my 2:30 section, we did only questions 1 – 2. |
||||||||
| No labs | ||||||||
| TA office hours end | ||||||||
| Finals week (17) | ||||||||
| Mon 11 Dec | Tue 12 Dec | Wed 13 Dec | Thu 14 Dec | Fri 15 Dec | Sat 16 Dec | Sun 17 Dec | ||
| No classes or TA office hours | ||||||||
| Office hours 10 AM – 12 PM HAAS G24 |
Final Exam 3:30 – 5:30 PM Hall of Music |
Office hours 10 AM – 12 PM HAAS G24 |
||||||
Last modified on Thu 14 Dec 2023 09:49 AM EST.