Expression evaluation in C/C++ doesnt follow BODMAS rule?
c, c++
Solution
There are far more operators than that. You can find a precedence tables for C++ and C.
But yes, you'll find it respects that. (Though I'm not sure it's exactly what you've said...)
Problem
When a expression is evaluated in C/C++, does it follow BODMAS [Bracket open Division Multiply Addition Substraction] rule? If not then how they are evaluated? EDIT: More clearly, If the following expression is evaluated according to BODMAS rule, (5 + 3)/8*9 First what is in brackets is processed. 8/8*9. Then Division is done. 1*9 And then multiplication and so on.