Needed solution..


Which operator is first preference in C++?

*, /, %, -, +

Can anyone tell me...
Are you talking about operator precedence? See here: http://en.cppreference.com/w/cpp/language/operator_precedence
closed account (3hM2Nwbp)
The dereference operator would have the highest precedence. ( * )
Mr. Luke please order that...
a=5,b=6,c=7

b+=a%2*c

I got the result is 13

But this way is correct or not..

b=b+a%2*c
= 6+5%2*7
= 6+1*7
=13

Is method is correct or not...


Topic archived. No new replies allowed.