CS1005, C Term 2000 Prof. Alvarez Test 1 Topics (this list is not exhaustive; also see HW1, Lab1, Lab2, the reading assignments from chapters 1-5 of Astrachan, the slides for chapters 1-5, and the code samples available in the /cs/cs1005/ directory; note that sections 3.4, 4.6, and 5.4 will not enter into Test1) Overall structure of a C++ program #include directives auxiliary functions main() function Basics of input/output cin, cout streams syntax of insertion, extraction operators need to include iostream library Functions advantages of using function declaration syntax function invocation syntax formal parameters vs. actual parameters return values function prototypes Object declarations and use standard data types: int, float, double, char, bool types provided by libraries: string (provided by string library) assignment operator =, initial object values object scope Arithmetic expressions operands and operators arithmetic operators: +, -, *, /, % behaviors for integer and floating-point types evaluating expressions: precedence rules arithmetic assignment: +=, -=, *=, /=, %= Boolean expressions Boolean operators: !, &&, || truth tables, short-circuit evaluation Order relational operators: ==, !=, <, >, <=, >= DeMorgan's laws Conditional processing if, if/else statements cascaded if/else Iteration while, do-while, for loops loop invariants