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

Verified
Correct Answer:
Verified
Related Questions
Q15: What is the output of the following
Q16: What is the output of the code
Q17: What will be printed by the statements
Q18: What is the first and last value
Q19: The process of hand-tracing code is valuable
Q21: Is the code snippet written below legal?
Q22: Assume the following variable has been declared
Q23: How many times is the text "Let's
Q24: What is the output of the code
Q25: What is the output of the code