105 Topics, Midterm 1 concept of an "operating system" compilation editor shell parts of the computer (computer organization) 4 kinds of memory (disk, ram, cache, registers): cost, size, speed pre-processor directives (include, define) resources in computer science six stages of a C program (edit, preprocess, compile, link, load, execute) the stack expressions statements declarations initialization blocks data types (int, double) variables (and memory) assignment statements math operators, esp / and % boolean operators function calls function prototypes function definitions logical operators, and operator precedence defined constants truth values (zero, other), boolean expressions (zero/one), logical operators (zero/one) conditionals (if, if/else, switch w/break) printf, scanf, format control statements, format specifiers arrays (index/subscript, declaration, initialization, traversal w/loops) read in from a file, write to a file; fprintf, fscanf, fopen, fclose, NULL, exit iteration definite iteration (for loops, while loops) indefinite iteration (while loops, sentinel loops) pre-defined function libraries, including stdio.h, stdlib.h binary, hex, decimal number systems and conversions directories, . and .. structured programming (sequence, selection, and repetition) finding min, max, count, sum, average of a sequence of data values (from user input, in an array, or from a file) return value from main program function with return values Unix shell commands: cp, mv, rm, ls, cat, pwd, mkdir, script #define, defined constants for loops arrays (index/subscript, declaration, constant initialization, initialization w/loops, traversal w/loops) rand(), srand() char data type; char arrays C-strings (null-terminated char arrays) the null character sentinel loops and strings binary, hex, decimal number systems and conversions do-while pass-by-reference vs. pass-by-value addresses: array names, %p directories basic html and chmod to create simple web pages (no html on the exam) ************************************************************ future topics: distinguish between actual and formal parameters/arguments ternary operator recursion malloc and free other file I/O: fgets, other? pre-defined function libraries, including math.h String library functions compiler commands command line arguments scope linear search binary search nested loops 2-d arrays structs more pass-by-reference vs. pass-by-value more addresses pointers distinguish between actual and formal parameters/arguments malloc and free DeMorgan's law functional decomposition dereferencing operators pointer expressions more shell commands: man, rmdir, chmod, more sorting: either selection or insertion sort menu driven programs return value from main program, and relation to shell scripts. linked lists optional (covered in CISC181)