Syllabus, MCS 275, Fall 1997

Prerequisites (chapters 1 through 7)

main() function returning values from functions comments writing strings writing integers writing floating-point numbers writing characters printf() field widths defining variables assigning values to variables initializers reading integers reading characters return value from scanf() prefix ++ and -- postfix ++ and -- a=b inside an expression += and other assignment operators equality and inequality numeric comparisons logical operations ?: expressions comma expressions short-circuit evaluation

while loops

do loops for loops

break
goto
continue

if statements else statements switch statements

default cases

defining functions calling functions function return type functions returning void return from functions returning void declaring functions defining function parameters defining functions with no parameters passing arguments to functions call-by-value character constants backslash in character constants

putchar()
getchar()
EOF
islower()
isupper()
tolower()
toupper()

other ctype.h macros the char type the short type the int type the long type

unsigned

the double type the sizeof operator how to compile programs using sin() the usual conversions casts

typedef

Pointers (beginning of chapter 8)

finding location of variable (“dereferencing”) finding variable at location (“referencing”) location types (“pointer types”) using pointers for call-by-reference using call-by-reference to return values the 0 pointer

NULL

Arrays (chapter 9)

when arrays are useful defining array variables accessing array elements initializing array variables initializing array variables with [] initializing array variables with 0 filled in the value of an array as a pointer pointer plus integer pointer minus integer pointer minus pointer array syntax in function parameters passing arrays to functions multidimensional arrays

Structures (chapter 12)

when structures are useful defining struct variables accessing struct components union types (not in textbook) initializing struct variables using struct for first-class arrays (not in textbook) list operations linked lists stored in two arrays (not in textbook) linked lists stored in array of structures (not in textbook) malloc() and free() (section 9.9) linked lists stored in dynamically allocated structures

Managing big projects (part of chapter 8)

the make tool (14.8) variable declarations variable definitions variable scope how to use extern how to use static for file scope automatic 0 initialization what static means for local variables

Strings (chapter 10)

C strings character constants string initializers string constants

argc and argv
strlen()
strcmp()
strcpy()
strdup()
strcat()

more standard string functions (part of Appendix A)

The standard I/O library (chapter 13)

printf() details
scanf() details

opening a file for reading

fgetc()
fscanf()
stdin

closing a file opening a file for writing

fputc()
fprintf()
stdout
stderr

opening a file for reading and writing

ftell()
fseek()
sprintf()
sscanf()

Miscellaneous topics

Recursion (chapter 11) Other useful standard functions (14.1, 14.2, Appendix A) Macros (Appendix B) Bitwise operations (Appendix C) More tools