Computer Science, asked by 8472, 9 months ago

5. Assuming that res starts with the value 25, what will the following code fragment print out?
System.out.println (res-- );
System.out.println (+ +res): ​

Answers

Answered by pavithranatarajan855
15

Answer:

25

25

Explanation:

res--       --> this is post decrement so 25 will be printed then 1 decremented.   res=(24)

res++   --->Currently res value is 24 ...++res this is pre increment so incremented by 1 then printed as 25.

Answered by bhumikasingh562
3

Answer:

  1. 25
  2. 25

Explanation:

This is a very important question including java

Similar questions