1) The statement: loop += count--; has the same effect as the statements: count
ID: 3662811 • Letter: 1
Question
1) The statement:
loop += count--;
has the same effect as the statements:
count = count+1;
loop = loop - count;
Select one:
a. TRUE
b. FALSE
2) Due to the way computers represent floating point numbers, not every number on the number line can actually be stored into a variable of type double or float.
Select one:
a. FALSE
b. TRUE
3) "Keywords" are reserved names (such as if or while) that cannot be used by programmers as the name of variables, constants or functions.
Select one:
a. FALSE
b. TRUE
4) When C++ evaluates the expression:
if (a < 3 || b > x || c != 12) { ... }
when a equals -1, C++ will short-circuit, report the answer as true,not evaluate the entire logical expression to determine the answer and run the statement block inside the { }s.
Select one:
True
False
5) Within a C++ program, all variables regardless of their type go thru a "life-cycle" which includes declaration, initialization, usage and finally dying off when the variable falls out of scope.
Select one:
a. TRUE
b. FALSE
6) In C++, the body of a for loop will always run atleast once.
Select one:
a. FALSE
b. TRUE
7) C++ programs are not case-sensitive.
Select one:
a. TRUE
b. FALSE
8) When a function wants to return more than one value, it must use pass-by-reference parameters to return some of the data back to the calling program.
Select one:
True
False
9) In C++, the body of a do-while loop is always guaranteed to run atleast once.
Select one:
a. TRUE
b. FALSE
10) One difference between a declared variable and a declared constant is that a variable’s value can vary at run-time, but a declared constant’s value cannot be changed after it is initialized.
Select one:
True
False
11) A function may accept either pass-by-reference or pass-by-value parameters, but not both in the same function.
Select one:
True
False
12) In C++, when double variables are left uninitialized, their initial value will not equal zero.
Select one:
a. TRUE
b. FALSE
13) When working with floating-point numerical values, programmers must use care because floating-point numerical representations are always inexact.
Select one:
True
False
14) When working with an if statement, an else clause is always required.
Select one:
True
False
15) The logical expression: ( x >= y ) executes the same as the logical expression: ( x > y && x ==y ).
Select one:
a. TRUE
b. FALSE
Explanation / Answer
1. loop += count--
This is equivalent to: loop = loop + count; count--;
The other given statement is: count = count + 1; loop = loop - count;
which means loop = loop - count + 1 which is not the same as the previous one. Therefore the answer is: b. FALSE.
2. b. TRUE. There is a limitation in storing the numbers, especially floating point or double numbers.
3. b. TRUE. Keywords should be different from from variables.
4. TRUE. Whereever the condition evaluates to true, it will stop evaluating right away, as it requires atleast one statement to be evaluated to true to proceed into the block.
5. TRUE.
6. a. FALSE.
7. b. FALSE.
8. TRUE.
9. a. TRUE.
10. TRUE.
11. FALSE.
12. a. TRUE.
13. TRUE.
14. FALSE.
15. FALSE.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.