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%@!
Start with four size_t values and two parenthesized expressions. With a = 45 and b = 7, c becomes 76 while d becomes 31, showing how grouping changes the computation. section 4.1.1
size_t is an unsigned semantic type for sizes and cardinalities. Unlike types specified directly with keywords such as unsigned or int, it is specified through a header file and communicates the intended meaning of a value. The type is defined in stddef.h. section 5.2
The arithmetic rules are precise:
- The operators +, -, and * on size_t produce the mathematically correct result whenever that result is representable in size_t. section 4.1.1
- Unsigned arithmetic is well defined, including negation and subtraction; results outside the range [0, SIZE_MAX] are arithmetic overflow. section 4.1.1
- size_t belongs to the unsigned-integer family, while its semantic naming emphasizes sizes rather than merely the machine representation. section 5.2
Unary operators
The expression (+a + -b) * 2 uses unary + to provide a value and unary - to produce its negative before multiplication. For unsigned size_t values, this negation and subtraction remain well defined. section 4.1.1

