MCQs
Total Questions : 8
Answer: Option B. -> b
alphabet b
After taking input from the user will check which string is entered and goes to particular case statement.
Output:
b
alphabet b
Answer: Option B. -> True
Condition is satisfied and value is not changed.
Output:
True
Answer: Option B. -> true
True or false will always evaluate to true, hence the elsif block is executed.
Answer: Option C. -> Syntax error
No two end statements required after if and else just one end statement is sufficient.
Answer: Option A. -> True
!true || true evaluates to true, hence elsif block gets executed.
Output:
True
Answer: Option D. -> All of the mentioned
Answer: Option D. -> None of the mentioned
As hungry is initialized to false hence the unless condition is executed.
Output:
Not hungry
Answer: Option C. -> Eleven is greater than two
You'r right
If condition is true then code is executed and then it comes out and then execute the remaining code.
Output:
Eleven is greater than two
You'r right