Review for Exam 2
- Read the book, think about the exercises.
- Look through the notes from class
- Go over the homework and other exercises from the book.
Chapter 6 - Data Types
- Viewgraphs: ch06.ppt
- A data type defines a collection of data objects and the operations that
can be performed on those objects.
- Primitive data types
- integers
- floating point
- decimal data types
- Boolean
- Character types
- other numeric types: rational, complex, fixed point
- Strings
- Primitive or structured
- static or dynamic length and storage
- Operations: assignment, concatenation, substring, pattern matching
- Strings
- enumerated types - C syntax
- subrange types
- Structured data types
- Array types - homogeneous
- storage - static, stack-dynamic, fixed heap-dynamic, heap dynamic
- access formulas
- operations - indexing, slices (think about how to address successive
elements of simple slices)
- Initialization
- associative arrays
- records - heterogeneous collection of elements
- fields accessed by name
- operations - assignment, element reference
- implementation
- variant records and unions
- Pointer and reference types
- operations - assignment and dereferencing
- explicit vs implicit dereferencing
Chapter 7 - Expressions and Assignments
- viewgraphs: ch07.ppt
- Arithmetic Expressions
- Precedence
- Associativity
- Conditional expressions
- Operand evaluation order
- Type conversion/coercion
- Relational and boolean expressions
- true/false values
- short circuit evaluation
- Assignment
- implementation issues - return type, operator symbol
- variable initialization
- compound and unary assignment operators
- mixed-mode assignment
Chapter 8 - Statement-level Control Structures
- viewgraphs: ch08.ppt
- Sections 1-4
- Selection
- Iteration
- Unconditional branches