An operator is a C symbol or token that specifies an operation on one or more operands. In a small computation, `size_t c = (a - b)*2;` uses `-` and `*` to compute a value, while `size_t d = a - b*2;` exposes how grouping affects the result. section 2.1 section 4.1.1
C uses operators for several distinct jobs:
- `+`, `-`, and `*` perform arithmetic; unary `+` preserves a value and unary `-` produces its negative. section 4.1.1
- `=`, used for initialization and assignment, modifies an object rather than merely computing a value. section 2.1 section 4.6
- `==`, `!=`, `<`, `>`, `<=`, and `>=` compare operands and produce `false` or `true`, represented as `0` or `1`. section 4.3.1
- `++` increments a variable by one; operators such as `<` can participate in control statements. section 2.1
Grouping and comparison as values
With `size_t a = 45` and `size_t b = 7`, `(a - b)*2` computes 76, whereas `a - b*2` computes 31 because parentheses enforce a preferred binding. A comparison can also become an index: `sign[(largeA[i] < 1.0)] += 1;` selects index `0` or `1` from the comparison result. section 4.1.1 section 4.3.1
size_t a = 45;
size_t b = 7;
size_t c = (a - b)*2;
size_t d = a - b*2;
!@%STYLE%@!
{"css":"{\"css\": \"font-weight: bold;\"}","target":"[[{\"line\":0,\"ch\":3},{\"line\":0,\"ch\":9}],[{\"line\":1,\"ch\":3},{\"line\":1,\"ch\":9}],[{\"line\":2,\"ch\":3},{\"line\":2,\"ch\":9}],[{\"line\":3,\"ch\":3},{\"line\":3,\"ch\":9}],[{\"line\":0,\"ch\":3},{\"line\":0,\"ch\":9}],[{\"line\":1,\"ch\":3},{\"line\":1,\"ch\":9}],[{\"line\":2,\"ch\":3},{\"line\":2,\"ch\":9}],[{\"line\":3,\"ch\":3},{\"line\":3,\"ch\":9}],[{\"line\":0,\"ch\":3},{\"line\":0,\"ch\":9}],[{\"line\":1,\"ch\":3},{\"line\":1,\"ch\":9}],[{\"line\":2,\"ch\":3},{\"line\":2,\"ch\":9}],[{\"line\":3,\"ch\":3},{\"line\":3,\"ch\":9}],[{\"line\":0,\"ch\":3},{\"line\":0,\"ch\":9}],[{\"line\":1,\"ch\":3},{\"line\":1,\"ch\":9}],[{\"line\":2,\"ch\":3},{\"line\":2,\"ch\":9}],[{\"line\":3,\"ch\":3},{\"line\":3,\"ch\":9}]]"}
!@%STYLE%@!
Inspect the paired arithmetic expressions to compare explicit grouping with the binding of multiplication. section 4.1.1






