CPE 101: Fundamentals of Computer Science I
Fall 2009

Examples

This page contains the list of all examples we used in class

smallest.c Functions: smallest of four numbers [February 11, 2011]
greatest.c Functions: greatest of four numbers [Feburary 11, 2011]
array10.c Arrays: 2D chessboard [February 11, 2011]
array09.c Arrays: out of bounds [February 11, 2011]
array08.c Arrays: getting out of bounds [February 11, 2011]
array07.c Arrays: getting out of bounds [February 11, 2011]
array06.c Arrays: simple loop [February 11, 2011]
array05.c Arrays: 2D arrays, diagonals [February 11, 2011]
array04.c Arrays: 2D arrays [February 11, 2011]
array03.c Arrays and functions [February 11, 2011]
array02.c Arrays: use of arrays in computations [February 11, 2011]
array01.c Arrays: simple example [February 11, 2011]
while.c a do-while loop [February 2, 2011]
while02.c a while loop [February 2, 2011]
do.c sentinel using do-while loop [February 2, 2011]
image.c PPM file generation [January 31, 2011] test.ppm - the output
loop04.c for loops [January 31, 2011]
for03.c Nested for loops [January 31, 2011]
for02.c Nested for loops [January 31, 2011]
for01.c for loop [January 31, 2011]
grades-b.c switch statement with breaks [January 24, 2011]
grades.c switch statement with fallthrough [January 24, 2011]
inc.c Prefix and postfix ++ and -- operators [January 24, 2011]
char-test02.c Character/Integer duality [January 24, 2011]
char-test.c Character type [January 24, 2011]
grades-f.c switch statement with breaks and useful fallthrough [January 21, 2010]
grades-b.c switch statement with breaks [January 21, 2010]
grades.c switch statement with fallthrough [January 21, 2010]
nestedif.c Nested If statements [January 18, 2011]
simpleif.c Simple If statements [January 18, 2011]
bslgebra.c Boolean Algebra expressions [January 18, 2011]
boo.c Boolean expressions [January 18, 2011]
div1.c Interger division [January 18, 2011]
div2.c Floating point division [January 18, 2011]
km2miles.c Kilometers to miles [January 10, 2010]
miles2km.c Our first program! [January 10, 2010]

January 3, 2011, dekhtyar at calpoly.edu