Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Big Java Late Objects
Quiz 4: Loops
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 41
Multiple Choice
Which of the following loops executes exactly 10 times?
Question 42
Multiple Choice
What are the values of i and j after the following code snippet is run? Int i = 10; Int j = 20; Int count = 0; While (count < 5) { I = i + i; I = i + 1; J = j - 1; J = j - j; Count++; } System.out.println("i = " + i + ", j = " + j) ;
Question 43
Multiple Choice
What is the output of this loop? int i = 0; boolean found; while (i < 20 && !found) { int sum = i * 2 + i * 3; System.out.print(sum + " ") ; if (sum > 50) { found = true; } i++; }
Question 44
Multiple Choice
What is the last output line of the code snippet given below? Int i = 0; While (i < 10) { Int num = 1; For (int j = i; j > 1; j--) { System.out.print(j + " ") ; Num = num * 2; } System.out.println("***") ; I++; }
Question 45
Multiple Choice
What is the output of the following code snippet? Double a = 2; Int n = 16; Double r = 1; Double b = a; Int i = n; While (i > 0) { If (i % 2 == 0) // n is even { B = b * b; I = i / 2; } Else { R = r * b; I--; } } System.out.println("r = " + r) ;