Tuesday, February 26, 2019

Spring 2019 MidTerm Notes

1 comment:

Amaby M said...

C++ Notes for Midterm
Multiple choice, fill in the blank and true/false questions.
Open book, open note, open compiler.

1. Understand the CPU memory pg 4

2. Pg 22 Where C++ comes from

3. Arithmetic operators and order of precedence pg 43

4. 50 – 51 type as conversion understand how to use it

5. 62 and the next few pages.. c in reads input and holds for later memory. What if you have
Int a, b;
Char x;
Double z;

Cin >> a >> x >> b;
265x171

a will have 265, x will have x, and b will have 171
what if you entered 171.05 as b?
how will z look?

6. Pg 69 increment and decrement 70-71

7. Output characters : pay attention to special characters
Pg 71, 77
Example: “I like \n c++”;

8. 127 mixing ints, double, char

9. Peek, putback, 135-137

10. 145 modulator, 146 showpoint and set precision

11. setFill 152,153

12. relational operators table pg 189 ==, /=, >, <, ect. symbols

13. if, if then else

14. pg. 199 boolean operators

15. Pg 200, 201 how AND and OR works, how many have to be true in order for it to work?

16. Pg 207 understand compound statements

17. Where are you using == instead of = ? Identify comparison

18. Switch statement pg 227 know the rules for the case and the value you’re checking for, the default and what you need to terminate the statement (break).

19. Understand loop structure. Pg. 271, while loops and what are 3 components you need for a loop. Hint: think about the for-loop.

20. Page 298 for loop structure and basic syntax.
For (init; condition; increment)
{
Statements;
}

21. Page 309 do while loop. Post test loop. Pg.310 has examples

22. Page 356 Value return function (user defined): What does it do when called?

23. Page 356 Return is an expression. You can return an expression, a number or a constant. If you have more than one, it will return the last one.

24. 360 Look at the compare at the top

25. 363 Good examples of returns. The question on the test will ask which will return what.

26. Void function is a non-returning value.