Pg 152 Setfill manipulator (see example on pg 153)
CH4
Pg 195 Basic syntax of if/else, what does a semicolon on the end of an if/else statement do? Nested if-else Where does the else go?
Pg 200-201 Nots, ands, ors: rules for those In an and, how many statements have to test true for it to be true? (both) In an or, how many statements have to test true for it to be true? (at least one)
Pg 221-222 The difference between equality and assignment =, == Anything other than 0 in an if statement with = will always output true
Pg 223 Conditional operator
Pg 227-230 Switch statement Using a break after every case Default works like an else
CH5
For and while - pretest Do while - post test - statement body will execute one time
Pg 269-272 While loop structure
Pg 298-299 Definition of for loop statement
Pg 309 Do while loop
Why would you use a for loop? (when you have a specific number of cycles) While loop (is good general purpose loop) Do while (you want the statement to execute at least once prior to testing your condition)
CH6
Pg 353 Value-returning functions and void functions
Pg 356 Syntax of return statement - return expr; Expr is a variable, constant value, or expression. With multiple variables, they must be the same data type as the function, and it will return the last variable in the list separated by commas (pg363)
Pg 361-362 Functional prototypes If the function is below where it is executed or referenced, it will return an error
Pg 399 Reference parameters and value-returning functions Scope of an identifier
1 comment:
Chapters 1-6
25 questions, 4pts per question
CH1
Pg 9
definition about what’s a compiler, source code, what is a cpp file
Pg 9
What is at the very top of your program, #include, what is that?
Where did C++ evolve from? (page 22)
CH2
Pg 50 type conversions
Truncated decimal when converting float/double to int
Pg 54-57
Setting up data type
Assignment initialize
Pg 69-71
incrementers and decrementers
Pg 72
cout/cin
Static strings
Escape sequences (pg77)
Pg 92
Doing compound assignment statements
CH3
Pg 127-128
Using cin and the extraction operator >>
Pg 129
Number 5; remember the rules of data type of a on pg 127 table 3-1
Pg 134-136
Cin and ignore function
Pg 137-138
Putback and peek functions
Pg 144-147
Setprecision manipulator, fixed manipulator, showpoint manipulator,
Pg 152
Setfill manipulator (see example on pg 153)
CH4
Pg 195
Basic syntax of if/else, what does a semicolon on the end of an if/else statement do?
Nested if-else
Where does the else go?
Pg 200-201
Nots, ands, ors: rules for those
In an and, how many statements have to test true for it to be true? (both)
In an or, how many statements have to test true for it to be true? (at least one)
Pg 221-222
The difference between equality and assignment
=, ==
Anything other than 0 in an if statement with = will always output true
Pg 223
Conditional operator
Pg 227-230
Switch statement
Using a break after every case
Default works like an else
CH5
For and while - pretest
Do while - post test - statement body will execute one time
Pg 269-272
While loop structure
Pg 298-299
Definition of for loop statement
Pg 309
Do while loop
Why would you use a for loop? (when you have a specific number of cycles)
While loop (is good general purpose loop)
Do while (you want the statement to execute at least once prior to testing your condition)
CH6
Pg 353
Value-returning functions and void functions
Pg 356
Syntax of return statement - return expr;
Expr is a variable, constant value, or expression.
With multiple variables, they must be the same data type as the function, and it will return the last variable in the list separated by commas (pg363)
Pg 361-362
Functional prototypes
If the function is below where it is executed or referenced, it will return an error
Pg 399
Reference parameters and value-returning functions
Scope of an identifier
Post a Comment