Saturday 16 March 2013

MCQ #10

Question) If you do not use curly braces for a while loop body , what will execute if the while condition is true?

Options)

  • Nothing
  • First statement of while
Answer) A copy of the value

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

t> UA-39527780-1 back to top