Computer Science, asked by championg48, 4 months ago

If a = 5 and b = 2 give the output of the following : [2] a + = (a++) + (++b) % 2 + a; System.out.println (a);

Answers

Answered by anindyaadhikari13
1

Answer:-

Given,

a=5, b=2

a+=a++ + ++b%2+a

>> a=a + a++ + ++b%2 + a

>> a=5+5+3%2+6

>> a=10+1+6

>> a=17

Now, a gets printed.

So, output:- 17.

Output:-

17

Similar questions