What will be the outcome of the following code
Attachments:
Answers
Answered by
0
HEY!!!
for (int a=0; a<10; a=a+4)
{
cnt++;
}
System.out.println(cnt);
2110:
is this your question
Answered by
2
output is:
This is printed
explanation:
value of ctr is 0. in while loop ,loop executes if value of ctr is 0.
after printing the statement value of ctr is changed to one and loop does not iterate as condition is not satisfied
hence loop iterates once and statement is printed once
hope it helps
all the best for your icse computer exam
plzz mark as brainliest
Similar questions