CSIA SUGGESTED STUDYING APPROACH - slides alone are not sufficient for adequate exam preparation: they are just an outline. However, only material that is on the slides will be on the exam. - use slides as a guide. Read the relevant chapters in the textbook. Review examples we studied in class. Review your labs, especially if you had a lot of help and are not sure about the code. If necessary, re-code important portions again. Come back to slides to make sure you are clear on all the material. TOPICS (not an exhaustive list) * basics: RAM(primary memory), memory location, address, CPU, input, output device application/system program, source/object/executable code, linker, compiler library syntax, semantics, stylistic rules of programming * variables: variable, value, declaration, identifier, keyword, assignment of a value input/output streams, input tokens, extraction/insertion operators * operations: types: int, double, bool, char; literal and named constants expressions: evaluation, type determination, operator, operand, arity integer operators, double operators, operator precedence compound assignment, increment and decrement: suffix and prefix forms variable initialization, initialization at declaration * branching constructs: logical operators (and, or, not), relational operators: equality, ordering expanded operator precedence block, local variables, variable scope branching constructs if, if-else selection constructs multiway if switch conditional operator, conditional expression ternary operator programming idiom, swapping values of two variables * looping constructs while, do-while, for iteration, loop variable iterate-and-keep-track idiom break and continue statements in looping constructs nesting of looping constructs * predefined functions argument, return value, function call/invocation, standalone/in expression nested function call type changing functions, casting and coercion random number generation: rand(), srand(), time() ranged random number idiom * programmer defined functions function definition, arguments vs. parameters, return statement function prototype, abbreviated vs. expanded form global constants and variables * program in multiple files executable vs. non-executable statements, local vs. standard include files linker operation, multiple inclusion protection * void functions void function, predicate, using predicate for expressions in branching and looping constructs parameter passing disciplines: call-by-reference vs. call-by-value * arrays aggregate construct, base type, array element, index out-of-range error, array initialization, passing arrays to functions, protecting against modification TOPICS NOT ON THE EXAM * strings declaration, inputting (cin/getline), assignment concatenation comparison, size(), empty() accessing as array searching, substr() inserting, replacing, appending, erasing passing as parameters, returning * file input/output streams: declaring, connecting to a file reading from a file, reading in a loop error checking on opening * namespaces: name collision; defining; resolving name declared in namespace; importing individual names, importing all names advantages/disadvantages, standard namespace