What will be the output of the following program?
Correct Answer : A
main, an integer variable
marks is declared and initialized to
50. Then comes an
marks > 70 returns
if is not executed. Control goes to
else if. Here condition is
marks > 35. This returns
true. So it is executed and display statement prints Pass.
Topic: if else if ladder In Java