-1

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

10/10/2019 2:18:01 PM

Prashant Pandey

+3

Prashant Pandey Sometimes someone and especially me ask the person at the other end what it is their understanding, It is easier to correct their understanding if they are wrong. I normally don't give direct answers, most of the time i like to know your current understanding.

+2

You are learning C, so where are you stuck with this?

+1

Baba Yaaga Try it out first.

+1

+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

0

Prashant Pandey That's what i asked you but you didn't replied.

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