Basic Arithmetic Operators
mian()
{
int x;
x=- 3 + 4 * 5 -6; /*1*/
printf("%d\n",x);
x=3 + 4 % 5 - 6; /*2*/
printf("%d\n",x);
x=- 3 *4 %-6 / 5; /*3*/
printf("%d\n",x);
x=(7+6)%5/2; /*4*/
printf("%d\n",x);
}
1.x=- 3 + 4 * 5 -6; by reading the precedence table
x=(- 3) + 4 * 5 -6; The highest level operator in the expression is the unary -. We'll use parentheses indicate the order of binding operands to operators.
x=(- 3) + (4 * 5) -6; Next highest in the expression is *.