\NEWEST VERSION WITH COMPLETE
QUESTIONS AND CORRECT DETAILED
ANSWERS\ACTUAL EXAM STUDY GUIDE
\LATEST UPDATE
This statement uses the value of a variable or expression to determine where the
program will branch to.
A. None of these
B. select
C. switch
D. scope
E. association
ANSWERS: C
If the expression on the left side of the following is false, the expression on
the right side will not be checked. (T/F)
(a >= b) && (c == d)
ANSWERS: True
,What is the output of the following code? int
w = 98;
int x = 99;
int y = 9;
int z = 1;
if (x >= 99)
{
if x < 99)
cout << y << endl; else
cout << z << endl;
}
else
{
if (x == 99)
cout << x << endl;
else
cout << w << endl;
}
A. 1
B. None of these
C. 0
D. 98
E. 99
ANSWERS: A
,This operator represents the logical OR:
A. ||
B. None of these
C. &&
D. --
E. #
ANSWERS: A
What is the value of the following expression?
true || false
A. None of these
B. +1
C. false
D. true
E. -1
ANSWERS: D
What is the value of the following expression?
true && !false
A. None of these
B. +1
C. -1
D. false
E. true
ANSWERS: E
, What is the value of result after the following code executes? int
a = 60;
int b = 15;
int result = 10;
if (a = b)
result *= 2;
A. code will not execute
B. 10
C. 120
D. 12
E. 20
ANSWERS: E
When a program lets the user know that an invalid choice has been made, this is
known as:
ANSWERS: input validation
If you place a semicolon after the statement: (x < y)
A. All of these are true
B. the code will not compile
C. the if statement will always evaluate to false
D. None of these
E. the compiler will interpret the semicolon as a null statement
ANSWERS: E