QUESTIONS AND CORRECT ANSWERS
Abstraction refers to the logical grouping of concepts or objects.
A. True
B. False - CORRECT ANSWER A. True
The following is an example of a valid program in Pseudocode:
MAIN
A. True
B. False - CORRECT ANSWER B. False
Which of these is not a property of a good algorithm?
A. Precise
B. Complete
C. Complex
D. Unambiguous - CORRECT ANSWER C. Complex
What is a skeleton program?
A. The simplest valid program possible in a programming language
B. Very spooky.
C. A pseudocode version of a programming algorithm
D. Invalid code - CORRECT ANSWER A. The simplest valid program possible in a
programming language.
Evaluate as an integer: 5 * 7 + 3 % 2 - 4
A. 32
B. 12
C. 17
D. 7 - CORRECT ANSWER A.32
,Evaluate as an integer: 8 - 3 * + 2
A. 18
B. 4
C. 8
D. 24 - CORRECT ANSWER B.4
Evaluate ((18 % 5) * 3) - (6 - 4) + 1
Assume all values are integers.
A. 0
B. 3
C. 5
D. 8 - CORRECT ANSWER D. 8
In the equation 2 + 8 /4 * 2, the addition operation + is evaluated first.
A. True
B. False - CORRECT ANSWER B. False
In the equation 2 + 8 /4 * 2, the division operation / is evaluated first.
A. True
B. False - CORRECT ANSWER A. True
Logical operators are evaluated before comparison/relational operators.
A. True
B. False - CORRECT ANSWER B. False
When assigning a value to a variable, the variable must be on the left of the assignment operator (=).
A. True
B. False - CORRECT ANSWER A. True
, A variable of datatype char can hold a single letter, number, or symbol.
A. True
B. False - CORRECT ANSWER A. True
What is the value of the variable divisor in the following equation?double divisor = 3.0/6.0;
A. 0
B. 2
C. 1
D. 0.5 - CORRECT ANSWER D. 0.5
Which of the following variables could hold the literal numeric value 3.141 without losing any
information?
A.float x
B. int y
C. char z
D. String w - CORRECT ANSWER A. float x
What is the value of the variable remainder in the following equation?
long remainder = 3 % 6;
A. 6
B. 3
C. 0
D. 0.5 - CORRECT ANSWER B. 3
Selection structures use what type of expression to determine if a block of code should run.
A. Bitlocker
B. Boolean
C. Byte
D. Bubble - CORRECT ANSWER B. Boolean