Common Languages:  
Precedence of operators

Arithmetic Operators in Different Languages
Fortran
Pascal
Ansi C
Ada
 
**
* / div mod
x++ x++
** abs
highest precedence
*  / all  + - ++x   --x *  /  mod  rem  
+  -   unary +  - unary +  -  
    /  % binary +  -  
    binary +  -   lowest precedence

45

Associativity of Operators


Associativity Rules of Operators
Fortran
Left *   /   +   - 
Right **
Pascal Left   All Operations
C
Left x++   x--   *    %    +b     -b
Right ++x  --x  +u   -u
Ada
Left All except **
Non-associative ** 
APL ALL  Right to Left
SmallTalk  ALL Left to Right
Calculation of
A * B + C   and   A + B * C

APL
3 x 4 + 5 = ?
3 + 4 x 5 = ?
SmallTalk
3 * 4 + 5 = ?
3 + 4 * 5 = ?
Fortran ( most Languages):
3 * 4 + 5 = ?
3 + 4 * 5 = ?
 
Exponential Operator
Fortran Ada
2 ** 3 ** 2 = ?
2 ** 3 ** 2 = ?
27, 23, 17, 35, 17, 23