Computer Science, asked by User7062, 9 months ago


What will be the output of the following code?
(a) int k=5,j=9;
k+= k++ - ++j + k;
System.out.println("k="+k);
System.out.println("j="+j);​

Answers

Answered by gauravarduino
6

Explanation:

Therefore 20 +5 = 25 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 ); ...

Answered by anushkakonchada7
6

Answer:

K=5,J=9

K+=(K++)-(++J)+K

K=K+(K++)-(++J)+K

K=5+5-10+6

K=10-10+6

K=0+6

K=6

Attachments:
Similar questions