Multiple Choice
What will be printed by the statements below?
Int val = 1;
Int sum = 0;
While (val < 5)
{
Sum = 0;
Sum = sum + val;
Val++;
}
System.out.print (sum) ;
A) 15
B) 10
C) 5
D) 4
Correct Answer:

Verified
Correct Answer:
Verified
Related Questions
Q70: What is the output of this code
Q71: What changes do you need to make
Q72: What is the output of the following
Q73: Which statement is correct about the execution
Q74: How many times does the following loop
Q76: What will be the output of the
Q77: What is the output of the following
Q78: How many times does the code snippet
Q79: Which error type does the "off-by-one" error
Q80: What values does counter variable i assume