diff options
author | Levi Bostian <levi.bostian@gmail.com> | 2013-09-01 13:17:26 -0500 |
---|---|---|
committer | Levi Bostian <levi.bostian@gmail.com> | 2013-09-01 13:17:26 -0500 |
commit | c4f541dc92ae149947a49a885292d8ad7ead7aa6 (patch) | |
tree | fbd74b5064e6fc6c4b97c9b0e28469be3d005dd5 /c.html.markdown | |
parent | 0ab144ff976c7a701acef552cc8e33b38faa7dbc (diff) |
Add order of evaluation table to C.
Diffstat (limited to 'c.html.markdown')
-rw-r--r-- | c.html.markdown | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/c.html.markdown b/c.html.markdown index ea047ea0..fd0b7964 100644 --- a/c.html.markdown +++ b/c.html.markdown @@ -593,6 +593,31 @@ typedef void (*my_fnp_type)(char *); // ... // my_fnp_type f; + +/////////////////////////////////////// +// Order of Evaluation +/////////////////////////////////////// + +//---------------------------------------------------// +// Operators | Associativity // +//---------------------------------------------------// +// () [] -> . | left to right // +// ! ~ ++ -- + = *(type)sizeof | right to left // +// * / % | left to right // +// + - | left to right // +// << >> | left to right // +// < <= > >= | left to right // +// == != | left to right // +// & | left to right // +// ^ | left to right // +// | | left to right // +// && | left to right // +// || | left to right // +// ?: | right to left // +// = += -= *= /= %= &= ^= |= <<= >>= | right to left // +// , | left to right // +//---------------------------------------------------// + ``` ## Further Reading |