Multiple Choice
What is the output of the code below? for (int val = 0; val < 4; val ++)
{
Int sum = val;
For (int num = 0; num < val; num++)
{
Sum = sum + num;
}
System.out.print (sum + " ") ;
}
A) 0 1 3 6
B) 0 1 4 10
C) 0 2 5 9
D) 0 2 7 16
Correct Answer:

Verified
Correct Answer:
Verified
Related Questions
Q72: Which of the following for loops is
Q87: What is the output of the code
Q89: When hand tracing, drawing a line through
Q89: Which of the following loops executes the
Q90: What is the output of the code
Q91: Which of the following loops will print
Q93: What does the method below return?<br>Int findSomething
Q95: In the following code snippet, when does
Q96: Which of the following code snippets will
Q97: Which of the following is the correct