Questions and CORRECT Answers
Which of the following variables could hold the literal numeric value 3.141 without losing
any information?
float x
int y
char z
string w - CORRECT ANSWER✔✔- float
What is the value of the variable divisor in the following equation?
Int divisor = 3/6;
0.5
1
0
2 - CORRECT ANSWER✔✔- 0
What is the value of the variable remainder in the following equation?
long remainder = 3%6;
6
3
0
0.5 - CORRECT ANSWER✔✔- 3
When assigning a value to a variable, the variable must be on the left of the assignment
operator (=).
True
False - CORRECT ANSWER✔✔- True
, Constants are used to make program maintenance easier.
True
False - CORRECT ANSWER✔✔- True
A DEFAULT CASE is required as part of a SWITCH statement.
True
False - CORRECT ANSWER✔✔- False
An IF statement must always have an ELSE statement after it.
True
False - CORRECT ANSWER✔✔- False
True or False: The following is an example of a valid program in Pseudocode:
END MAIN - CORRECT ANSWER✔✔- False
You must declare and initialize a variable in two separate steps.
True
False - CORRECT ANSWER✔✔- False
Evaluate 10-(40+(20/(10-5)*2)/4)+50
18
22
4