Computer Science, asked by Sumitop, 10 months ago

2. int a=10, b=15;
int c= 25/ a++ / b++ - b-- / a--;​

Answers

Answered by sswaraj04
0

Answer:

a = 10 and b = 15

25 / a++ means 25 / 10 = 2 ( since it's int type so automatically converted to integer )

value of a is 11 now

25/a++/b++ means 2 / 15 = 0 (same reason integer conversion )

value of b is 16 now

b--/a-- means 16/11 = 1 ( again automatic conversion to integer )

final value

0 - 1 = -1

Explanation:

Hope it helps :-)

Answered by anindyaadhikari13
1

Question:-

Write the output of the following code.

Working Out:-

Given,

int a=10,b=15;

int c=25/a++/b++ - b--/a--;

Or,

c=25/10/15 -16/16

Or,

c=2/15-1

Or,

c=0-1

Or,

c = -1

Answer:-

c = -1.

Similar questions