Outline for April 10, 2002
Handouts: More Sample C Programs
Reading: Johnsonbaugh & Kalin pp. 153-176, 230-237, 305-329
-
Greetings and felicitations!
-
Homework, problem 3: review scanf and how to read in integers
-
Homework, problem 4: floating point constants (1.0F) vs. double constants (1.0)
-
Homework, problem 5: how to input newline (^V^J), carriage return (^V^M), bell (^G), form feed (^L), vertical tab (^K), NUL (^2).
-
dands2.c
-
switch
-
pow.c
-
function prototype & declaration
-
pass by value vs. pass by reference; C always the former
-
scope in functions
-
returning values
-
copy1.c
-
strings (NUL-terminated arrays)
-
printing strings
-
copy2.c
-
definition of pointer; address of variables (&), dereferencing of pointer (*)
-
how it is used
-
pointer arithmetic (in the printf)
-
swaps.c
-
pointers and parameter lists
-
pointers and var paramaters