Multiple Choice
What is the output of the following code fragment?
Int i = 1;
Int sum = 0;
While (i <= 15)
{
Sum = sum + i;
I++;
}
System.out.println("The value of sum is " + sum) ;
A) The value of sum is 0
B) The value of sum is 105
C) The value of sum is 120
D) The value of sum is 136
Correct Answer:

Verified
Correct Answer:
Verified
Related Questions
Q54: Select the statement that correctly completes the
Q55: What are the values of i and
Q56: A loop inside another loop is called:<br>A)
Q57: What is the sentinel value in the
Q58: The code snippet below checks whether a
Q60: Given the following code snippet, what should
Q61: Which statement about this code snippet is
Q62: When designing storyboards, it is a good
Q63: What for loop can be used in
Q64: When hand-tracing the loop in the code