Study Topics for Test 2
- Debugger
- Functions
- reasons for writing functions
- writing prototypes
- writing function definition
- function calls - syntax and semantics
- parameters and arguments
- flow of control (execution)
- scope - global vs local vs parameter
- lifetime of a variable
- initialization of local variables
- value-returning versus void functions - writing and calling
- functional cohesion - "a function should do one job,
do it well, and do nothing else"
- stubs and drivers
- Selection
- bool data type
- bool constants
- relational operators <, >, etc.
- the difference between == and =
- comparing strings
- comparing characters
- comparing floats
- logical operators - &&, ||, !
- precedence with other operators
- truth tables
- if statements
- if-else statements
- where braces go
- dangling else
- nested if statements
- if - else if statements
- tracing ifs
- test plans
- regression testing
- random numbers
- repetition
- syntax
- control logic - counter-controlled and sentinel-controlled
- infinite loops