105 Topics, Midterm 2 midterm 2 topics: all midterm 1 topics, plus: the stack arrays arrays as parameters parallel arrays structs structs as parameters arrays of structs pass-by-reference vs. pass-by-value addresses functions write function prototypes write function definitions write function calls distinguish betweeen function prototype, definition and call. distinguish between actual and formal parameters/arguments functional decomposition file I/O fopen fprintf, fscanf fgets pre-defined function libraries, including math.h char arrays, C style strings, string functions, null terminating character strcmp strlen strcpy strcat recognizing and handling whitespace DeMorgan's law shell commands: cp, mv, rm, chmod, ls, cat, mkdir basic html and chmod to create simple web pages directories compiler -o option man pages scope finding min, max, count, sum, average of a sequence of data values (from either an input file or an array). menu driven programs rand() and srand() ********************************************************************** from first midterm: concept of an "operating system" compilation editor shell parts of the computer (computer organization) 4 kinds of memory pre-processor directives resources in computer science six stages of a C program expressions statements data types variables (and memory) assignment statements math operators, especially DIV and MOD recognize function calls logical operators, and operator precedence constants truth values, boolean expressions, logical operators conditionals (if, if/else, switch, ) printf, scanf, format control statements, format specifiers iteration definite iteration (for loops, while loops) indefinite iteration (while loops, sentinel loops) nested loops pre-defined function libraries, including stdio.h binary, hex, octal, decimal number systems shell commands: cp, mv, rm, ls, cat, script directories, . and .. structured programming (sequence, selection, and repetition) finding min, max, count, sum, average of a sequence of data values return value from main program ************************************************************ future topics: addresses pointers reference parameters ternary operator indefinite iteration (do while) recursion the heap malloc and free dereferencing operators pointer expressions compiler commands command line arguments scope linear search binary search sorting: either selection or insertion sort timing programs return value from main program, and relation to shell scripts. linked lists optional (covered in CISC181)