/operator-precedence

Learn the C operator precedence rules

Primary LanguagePython

Practice C operator precedence rules.

Usage

The script will present a C expression and prompt for the integer result.

3 * 5 & 2
=> 

Enter the correct result, receive another expression.

Enter an incorrect result, get prompted again.

Enter '?', the answer will be printed.

Todo

  • unary operators
  • RTL-associative operators
  • operators that apply only to lvalues, pointers, functions