class: title # Pause for Breath ## CSC 161 – February 12, 2026 --- # Agenda for Today 1. Quiz 2. Department Events 3. Upcoming Work 4. Code Cleanup 5. Lab 6. Wrap Up --- class: section green # Quiz --- # Department Events ## CS Table: Open Source and LLMs .indent[ Tuesday, February 17th at noon in JRC 224C ] You can find a complete list of token events and submit more at
. --- class: section blue # Upcoming Work --- # Homework: Yahtzee **Due:** Thursday, February 12th by 10pm **Late Deadline:** Saturday, February 14th by 10pm ## Questions **What resources can we use if we have questions on an assignment?** - Any material posted or linked on the course website (no other online resources) - Linux `man` pages - Work you completed for labs (cite your partner) - Office hours You can discuss general C questions and program design with evening tutors and other students in the course, but the work you submit must be your own. If you need to work on the assignment from off campus you can access a MathLAN session by going to
. --- # Homework: Connect Four **Due:** Thursday, February 26th Let's look at the assignment now. --- class: section blue # Code Cleanup --- # Code Cleanup 1 How can we make this code better? ```c switch(x) { case 1: printf("x is 1\n"); break; case 2: printf("x is 2\n"); break; case 3: printf("x is 3\n"); break; ... ``` --- # Code Cleanup 2 How can we make this code better? ```c switch(valid) { case 1: valid_count++; break; default: break; } ``` --- # Code Cleanup 3 How can we make this code better? ```c bool is_odd(int x) { switch(x % 2) { case 1: return true; default: return false; } } ``` --- class: section blue # Wrap Up --- # Wrap Up ## Yahtzee Assignment Submit your Yahtzee homework by 10pm tonight, or use a token to submit it by Saturday. ## Lab Work Submit the completed Tic Tac Toe game for your week 4 lab report. ## Reading - **Structs** (Beej's Guide to C Programming, Chapter 8) - **Unions** (Beej's Guide to C Programming, Section 20.9) - **Enumerated Types: `enum`** (Beej's Guide to C Programming, Chapter 22)