Which is used when a single block of statements is to be executed if the condition is true?

  • AWhile loop
  • BDo-while loop
  • CIf statement
  • DNone of these
Show answerHide answer

Correct answer C

An if statement executes a single block of code only if the given condition is true. It is a conditional control structure.