Exam 1z0-808 All QuestionsBrowse all questions from this exam
Question 183

Given the code fragment:

Which code fragment inserted at line 10 print ****?

A.

B.

C.

D.

E.

    Correct Answer:

    E

Discussion
akbiyik

Answer is A and E.

carloswork

Answer is A and E. To test: public static void main(String[] args) { int x; /* insert code here */ /* Option A - Ok */ /* x = 3; do { System.out.print("*"); x--; } while (x >= 0); */ /* Option B - It does not enter the loop. */ /* x = 0; do { System.out.print("*"); x++; } while (x >= 3); */ /* Option C - It does not enter the loop. */ /* x = 0; do { System.out.print("*"); ++x; } while (x > 3); */ /* Option D - I only printed two asterisks */ /* x = 3; do { System.out.print("*"); x--; } while (x != 1); */ /* Option E - Ok / /* x=0; do { System.out.print("*"); }while(x++ < 3); */ }

BelloMio

Answer is AE

7df49fb

Only A

iSnover

The correct answer is the letter E, because it starts to put * from zero, analyze these questions well, the answers are very confusing precisely to take the time wrong on purpose.