Control Structures Quiz
By Mickey Arnold
starstarstarstarstarstarstarstarstarstar
Last updated 10 months ago
4 Questions
1 point
1
Question 1
1.
What will the output of this control structure?
int loopCounter = 0;
do
{
out.println();
loopCounter++;
} while (loopCounter < 3);
What will the output of this control structure?
int loopCounter = 0;
do
{
out.println();
loopCounter++;
} while (loopCounter < 3);
1 point
1
Question 2
2.
What will the output of this control structure?
int loopCounter = 0;
do
{
out.println();
loopCounter++;
} while (loopCounter < 3);
What will the output of this control structure?
int loopCounter = 0;
do
{
out.println();
loopCounter++;
} while (loopCounter < 3);
1 point
1
Question 3
3.
What will the output of this control structure?
int loopCounter = 0;
do
{
out.println();
loopCounter++;
} while (loopCounter < 3);
What will the output of this control structure?
int loopCounter = 0;
do
{
out.println();
loopCounter++;
} while (loopCounter < 3);
1 point
1
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);
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);