Output of this code.
int a=12;a++; system.out.println(a);
a-=a—+—a; system.out.println(a);
Answers
Answered by
3
- Write the output of the following code.
Given code,
int a=12;
a++;
System.out.println(a);
a-=a-- + --a;
System.out.println(a);
At first,
a=12,
a++
So, a=13 now.
Therefore, 13 is printed.
Now,
a-=a-- + --a
Or,
a=13-(13+11)
Or,
a=-11
Therefore, -11 is printed.
13
-11
Similar questions