- 1

Printf("\n%d",a++*c--/++d) where a=20,d=5,c=2

Please answer with explanation

10th Oct 2019, 2:18 PM
Prashant Pandey
Prashant Pandey - avatar
8 ответов
+ 1
My bad It prints 6???
10th Oct 2019, 3:27 PM
Joѕнυα
Joѕнυα - avatar
+ 1
I think its 40/6
10th Oct 2019, 3:28 PM
Prashant Pandey
Prashant Pandey - avatar
+ 1
Sorry for the mistake Its 20*2/6=6 Because postfix decrement first use the value and then decrement it
10th Oct 2019, 3:28 PM
Joѕнυα
Joѕнυα - avatar
+ 1
Sorry swim i didnt understand what you asked sorry once again
10th Oct 2019, 3:30 PM
Prashant Pandey
Prashant Pandey - avatar
+ 1
Thankyou to all
10th Oct 2019, 3:30 PM
Prashant Pandey
Prashant Pandey - avatar
0
Why
10th Oct 2019, 3:27 PM
Prashant Pandey
Prashant Pandey - avatar
0
I think 20*2/6=40/6=5 And the value of a=21 d=6 c=1
12th Oct 2019, 11:18 AM
Avijit Maity
Avijit Maity - avatar
- 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
10th Oct 2019, 3:24 PM
Joѕнυα
Joѕнυα - avatar