Which of the following do/while loops will compile without errors?
a. int i = 0; do { System.out.println(i++); } while (i < 50); b. int i = 0; do System.out.println(i++); while (i < 50); c. int i = 0; do System.out.println(i++); while i < 50; d. i = 0; do System.out.println(i); i++; i++; i++; while (i < 50);
A and B
C needs parentheses around the expression, i < 5.
D requires a block statement if more than one statement is used between the do and while keywords.