Computer Science, asked by atulchandra108, 10 months ago

int y;
2. What will be output of the following code:
for( y = 0; y<= 5; ++y)
System.out.println( y );
System.out.println( y );​

Answers

Answered by tupur34
0

Answer:

1,2,3,4 I think so. hope it helps

Answered by jgada747
0

Answer:

Output will be

0

1

2

3

4

5

6

Explanation:

because loop is starting from 0 till 5 and at the end ++y means 5+1 so it will be 6

Similar questions