MCQ
Which of the following loop does print integer values from 0 to 9?
  • A
    for (int i=0;i<1O;i++) { System.out.println(i); }
  • B
    int i0; while(i<1O) { System.out.println(i++); }
  • C
    int i0; do { System.out.println(i++); }while(i<1O);
  • All of these

Answer

Correct option: D.
All of these
All of these

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