CSC 160 - Chapter 3 Quick Reference
Chapter 3 "Expressions and Interactivity"
General Terms
input buffer |
expression |
precedence |
associativity |
type coercion |
promote/demote |
overflow/underflow |
typecast operator |
C++ Syntax/Constructs
cin |
pow() |
const |
string |
#define |
getline |
|
|
>> stream extraction operator |
+=, -=, *=, /=, %= compound operators |
Concepts
Important concepts covered include:
- Precedence order of arithmetic operators (p. 91)
- Converting algebraic expressions into C++ expressions
- Data type ranking (p. 97)
- 3 rules of type coercion (p. 98)
- Compound operators (p. 112)
- Output formatting with <iomanip> including setw,
setprecision(), fixed, right, left
- The difference between getline() and "cin >>" (p.
126)
- Inputting a character: cin.get(), cin.ignore (p.128)
- C-Strings (p131)
- <cmath> Math library functions (p. 137)
- Generating random numbers with rand() and srand() (p. 139)
- Introduction to files: <fstream>, declaring, opening,
reading, writing, closing (p. 141)
Disclaimer: The goal of this "cheat sheet" is to review
the more important concepts in the chapter. The exclusion of any
material in the chapter from this "cheat sheet" does not mean
that you are not responsible for that material.