- 1
Printf("\n%d",a++*c--/++d) where a=20,d=5,c=2
Please answer with explanation
12 Respostas
+ 1
My bad
It prints 6???
+ 1
I think its 40/6
+ 1
Sorry for the mistake
Its 20*2/6=6
Because postfix decrement first use the value and then decrement it
+ 1
Sorry swim i didnt understand what you asked sorry once again
+ 1
Thankyou to all
0
Why
0
I think
20*2/6=40/6=5
And the value of
a=21
d=6
c=1
- 1
Ans = 3
The *, /, and % are performed first in order from left to right and then + and -, also in order from left to right.
The ++, - - have higher precedence than *, /.
So it works like 21*1/6=3