Operator PrecedenceNow, that multiplicative operations take precedence over additive ones should be known to everyone who didn't fail at elementary school. But seriously, what takes precedence: logical negation or bitwise left shift? You only need to concern yourself with such questions if you are into software development. Now, you could try to memorize all precedence rules or rely on explicit parentheses -- or you just stick a table of all precedence rules to your office wall. A cheat sheet for adults, practically. For those who (like me) would prefer the cheat sheet solution and can constrain (operator precendence being a pretty language-specific topic) themselves to plain C (that is not C++, Java or something else or other) only, I've made such a precedence table. This table can be dowloaded right here in PDF format. Maybe it's useful for you. Maybe it's not. I don't care too much either way. |