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