Topics


----------------------- Thursday, January 26 -----------------------

Introduction
Go over syllabus & class academic integrity policy.
PPT1_Introduction.ppt.

----------------------- Tuesday, January 31 -----------------------

Using Unix
Booting class machines into Linux
Set Firefox cache size
Basic Unix commands: ls, mkdir, cat
Using submit
Classwork 1: Unix Practice
Discussed Homework 1: Remote Login
Logging into GL using your own machine

----------------------- Thursday, February 2 -----------------------
More Unix commands: cp, mv, rm, more, script
Using the nano text editor
Classwork 2: More Unix Practice, part 1

First C program
"Hello World"
Parts of a C program
Programs: hello.c and hello1.c.
Classwork 2: More Unix Practice, part 2 (your first C program)

----------------------- Tuesday, February 7 -----------------------
Programs: hello2.c and hello3.c.

Console I/O
printf() and scanf()
Programs: scanf1.c and scanf2.c (buggy).
Classwork 3: Input & Output
Programs (skipped): scanf3.c (buggy), scanf4.c (buggy) and buffer.c.

----------------------- Thursday, February 9 -----------------------

Values & Expressions
legal variable names, variable types: PPT2_Variables
arithmetic expressions and operators: PPT3_Expressions
Operator precedence and associativity
Type conversion between int and double

----------------------- Tuesday, February 14 -----------------------
Classwork 4: Expressions

----------------------- Thursday, February 16 -----------------------

Preview of functions
order of execution in function calls
function prototypes
Programs: roses1.c, roses2.c, roses3.c (buggy) and roses4.c.
parameters and return values
Programs: add1.c and add2.c.
Programs (skipped): average1.c, average2.c and average3.c.
using functions from the math library
Program: math.c
Classwork 5: Functions

----------------------- Tuesday, February 21 -----------------------

If Statements
boolean expressions
Programs: if1.c, if2.c (buggy), if3.c, if4.c (buggy), if5.c, if6.c, if7.c and if8.c.
Classwork 6: Blackjack Strategy

----------------------- Thursday, February 23 -----------------------
Cascading if statements: cascade.c
DeMorgan's Law: demorgan.c
Dangling else: dangle1.c (buggy) and dangle2.c.

While loops
Loops for repetition
Programs: seventeen1.c, seventeen2.c, seventeen3.c, while1.c, while2.c and while3.c.
Classwork 7: I am Thinking of a Number

----------------------- Tuesday, February 28 -----------------------
(Aside) scanf() return value: scanf5.c and scanf6.c
Using loops to validate input: input1.c and input2.c.
(Aside) the largest int value: int_max.
Find the smallest input: min1.c, min2.c and min3.c.

----------------------- Thursday, March 1 -----------------------
Programs with nested while loops: gym1.c, gym2.c, gym3.c, gym4.c, gym5.c and gym6.c.
Classwork 8: Bar Graphs

Quiz 1

----------------------- Tuesday, March 6 -----------------------
Program that computes the square root by approximation: sqrt.c.

For loops
Programs: for1.c for2.c for3.c for4.c
Some shorthand operators: ops.c
Don't use floating point index variables: beer.c (buggy)

----------------------- Thursday, March 8 -----------------------
Modularity in programming
Postmortem on Classwork 8 using sample student submissions: cw08-1.c, cw08-2.c, cw08-3.c, cw08-4.c and cw08-5.c.
Classwork 9: Amortization Table

----------------------- Tuesday, March 13 -----------------------
Nested for loops: gym7.c (skipped)
A Digression on Machine Architecture: PPT4_Architecture.ppt.
Classwork 10: Isosceles Triangle

----------------------- Thursday, March 15 -----------------------
Finish Classwork 10: Isosceles Triangle

Quiz 2

----------------------- Spring Break -----------------------

----------------------- Tuesday, March 27 -----------------------

Functions
Programs (previously skipped): average1.c, average2.c and average3.c.
Homework 5 using functions: bar2.c, bar3.c and nobar.c.
Reference parameters: swap1.c (buggy!), swap2.c, swap3.c, minutes.c and ref_par.c.

----------------------- Thursday, March 29 -----------------------
Classwork 11: Two Simple Functions
Local variables: local1.c, local2.c and local3.c.
Uninitialized local variables: garbage1.c (buggy!), garbage2.c (buggy!).

----------------------- Tuesday, April 3 -----------------------
Miscellaneous function features: global.c and promote.c (skipped).
#include explained: hello.c, include1.c and include2.c.
Separate compilation: addi.h, addi.c and addtest1.c.
More on separate compilation (skipped): addten.h, addten.c and addtest2.c.
Guarded header files (skipped): twice1.h, twice1.c, twice2.h and twice2.c.
Classwork 12: Separate Compilation

----------------------- Thursday, April 5 -----------------------

Top-Down Design
Top-Down Design discussion: Calendar

Quiz 3

----------------------- Tuesday & Thursday, April 10 &12 -----------------------
Top-Down Implementation: Classwork 13 (group work)

----------------------- Tuesday, April 17 -----------------------

Arrays
Simple uses of any array: array1.c, array2.c.
Out of bounds: overwrite1.c (buggy!) and overwrite2.c (buggy!).
Array input: input1.c, input2.c, input3.c and input4.c.

----------------------- Thursday, April 19 -----------------------
Classwork 14: Mode

Quiz 4

----------------------- Tuesday, April 24 -----------------------
More on for loops and arrays
Classwork 15: April Weather Report

----------------------- Thursday, April 26 -----------------------
Arrays & functions
Bubble Sort: bubble1.c, bubble2.c, bubble3.c and bubble4.c.
Classwork 16: Searching

----------------------- Tuesday, May 1 -----------------------

Strings
Characters, strings and the ASCII table
The ASCII code: ascii1.c, ascii2.c, ascii3.c and beep.c.
Strings are arrays of characters: string1.c, string2.c, string3.c and string4.c.
Processing a string: Convert lower case characters to upper case: upper1.c and upper2.c.
String comparison: compare1.c.
Classwork 17: Character Substitution

Quiz 5

----------------------- Tuesday, May 8 -----------------------
Pointers vs arrays: pointer1.c, pointer2.c and pointer3.c.
Robust I/O using readline(): enter1.c, enter2.c and compare2.c (skipped).
Copying strings (skipped): copy1.c, copy2.c, copy3.c and copy4.c.
Classwork 18: Trim Spaces

----------------------- We are here -----------------------

Review for Final Exam

Final Exam

Number Systems (Skipped): PPT5_Number_Systems.ppt.