It is necessary that always if should come with else block?
True
False
Answer and explanation
Not necessary, if can execute alone.
ObjectiveMcq
Print Protected
This page is protected for print. Use the website to view the content.
3 practice sets · Page 1 of 1
It is necessary that always if should come with else block?
True
False
Not necessary, if can execute alone.
Which of the following is valid conditional statement?
else
els
if else
None of the mentioned
Else is valid conditional statement.
What is the use of else statement?
When the if condition is false then the next else condition will get executed
When the if condition is false then the elsif condition will get executed
When the if condition is false and if else condition is true then only it will get executed
None of the mentioned
When the if expression gives false value and the else condition is true then only it will get executed.