Computer Science, asked by sonisaab36, 7 months ago

What will be the output of the following code?

int k= 5, j= 9;

k+= k++ - ++j + k;

System.out.println(“k= “+k);

System.out.println(“j= “+j);​

Answers

Answered by Abeeha55550
2

Answer:

k=6

j=10

WORKING

k+= k++ - ++j + k

⇒ k = k + (k++ - ++j + k)

⇒ k = 5 + (5 - 10 + 6)

⇒ k = 5 + 1

⇒ k = 6

Similar questions