Log in
Sign up for FREE
arrow_back
Library
Control Structures Quiz
By Mickey Arnold
star
star
star
star
star
Share
share
Last updated about 2 years ago
4 questions
Add this activity
1
1
1
1
Question 1
1.
What will the output of this control structure?
int loopCounter = 0; do { out.println(); loopCounter++; } while (loopCounter < 3);
Question 2
2.
What will the output of this control structure?
int loopCounter = 0; do { out.println(); loopCounter++; } while (loopCounter < 3);
Question 3
3.
What will the output of this control structure?
int loopCounter = 0; do { out.println(); loopCounter++; } while (loopCounter < 3);
Question 4
4.
What is the output of this control structure?
int resultOperation = (firstOperand > secondOperand) ? (7 - Math.min(4, 2)) : -12; System.out.println("Step 3 value: " + resultOfTernaryOperation);