1.

Else part is compulsory in if-else statement

Answer»

Answer:

No, It's not required to WRITE the else part for the if STATEMENT. In fact most of the developers prefer and recommend to avoid the else block. This is purely a matter of style and CLARITY. It's easy to imagine if statements, particularly SIMPLE ONES, for which an else would be quite superfluous.

Explanation:

I hope you get help.



Discussion

No Comment Found

Related InterviewSolutions