+ 1

Where does the % operator lie in the order of arithmetic preference in c++???

11th Feb 2017, 3:28 AM
Mohammed Mubin
2 Réponses
+ 28
/,*,% all have same preference. It depends on how they are arranged and which comes first. 31%2/3 - first % then / 31/2%3 - first / then % so it depends on the order of which comes first.
11th Feb 2017, 3:48 AM
Frost
Frost - avatar
0
I don't know, I have never needed to use a remainder for anything.
18th Feb 2017, 11:17 AM
David Morrison
David Morrison - avatar