Slides for COS126 Precept 1
by Georg Essl
Day
Week
Slide
Friday
1
Hello C-World
Structure of a C program
Structure of a C function
Flow control: if()
Flow control: if() cont'd
Loops: while()
Loops: for()
Input/Output: printf()
Input/Output: scanf()
An example: Brute force root finding
Friday
2
Arrays: An example: Sieve of Eratosthenes
Monday
3
Assignment #2: Mandelbrot on a terminal (text)
Assignment #2: Mandelbrot in postscript
Friday
3
Structures: struct
Structures: typedef
Interfaces: An example header file
Interfaces: An example implementation
Interfaces: An example client
Monday
4
Pointers: A beginning
Friday
4
Recursion: factorial function
Recursion: Euclid's algorithm
Recursion: Stack operations
Pointers: A pointer list
Pointers: Going through a list
Pointers: Memory allocation
Pointers: Inserting into a list
Monday
5
Data structures: Queue operations
Friday
5
Pointers: Building a circular list
Pointers: Example: Reversing a list
Pointers: Example: Sorting a list
Monday
6
Pointers: Dynamic Array Allocation
Assignment #4: A long star tour
Assignment #4: A shorter star tour
Assignment #4: A short star tour
Monday
7
Recursion&Pointers: Examples
Assignment #5: A single H (D=0)
Assignment #5: Some 21 Hs (D=2)
Assignment #5: Many Hs (D=5)
Assignment #5: Many Hs gray-scaled
Assignment #5: Some Boxes
Strings: Characters
Strings: Strings
Boolean Logic: AND, OR, NOT
Boolean Logic: Sum-Of-Products
Friday
7
Strings: Command-line arguments
Input/Output: Reading a file (1)
Input/Output: Reading a file (2)
Monday
8
Pattern Matching: grep (1)
Pattern Matching: grep (2)
Pattern Matching: Regular Expressions
Friday
9
Strings: strcmp() and qsort()
Strings: qsort() Example
Strings: bsearch()
Monday
11
Java: From C to Java
Java: Classes
Java: Objects (instances of classes)
Java: Inheritance
Java: Applets
Back to
Georg's Homepage
.
© 1998 Georg Essl. Based on material prepared by David Hanson, Robert Sedgewick
et al.
for the COS126 course at Princeton University. Use of this slides for commercial and non-academic purposes requires specific permission by the author.