Question) If you do not use curly braces for a while loop body , what will execute if the while condition is true?
Options)
Explanation) If you do not provide braces to any loop statements then 1st statement is taken by default. Same is true even for if-else statement For more details refer the post on Loop Statements.
Options)
- Nothing
- First statement of while
Explanation) If you do not provide braces to any loop statements then 1st statement is taken by default. Same is true even for if-else statement For more details refer the post on Loop Statements.
No comments:
Post a Comment