MCQ
Which of the following is correct syntax of while loop ?
  • A
    while (exp1; exp2; exp3) {statements}
  • while (exp) {statements}
  • C
    while {statements} (exp);
  • D
    while {statements} (exp1; exp2; exp3)

Answer

Correct option: B.
while (exp) {statements}
B

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free