A value that changes
Consider `double x = 5.0; double y = 3.0; x = (x * 1.5) - y; printf("x is %g\n", x);`. The assignment changes x from 5.0 to 4.5; the later use of x supplies 4.5 to printf. The multiplication and subtraction also produce values, but those intermediate results are not stored in named variables. section 5.1
A variable is a named data object that stores a value. Keep four things distinct: the identifier (`x`), the object it names, the object’s type (`double`), and its current value. A declaration identifies the type and name; an initializer can give the object its first value. TAKEAWAY: the name is not the value, and assignment can change the value without changing the name or type. section 2.2 section 5.1
int main(void);
double A[5];
size_t i;
!@%STYLE%@!
{"css":"{\"css\": \"font-weight: bold;\"}","target":"[[{\"line\":0,\"ch\":0},{\"line\":0,\"ch\":3}],[{\"line\":0,\"ch\":4},{\"line\":0,\"ch\":8}],[{\"line\":0,\"ch\":9},{\"line\":0,\"ch\":13}],[{\"line\":1,\"ch\":0},{\"line\":1,\"ch\":6}],[{\"line\":2,\"ch\":0},{\"line\":2,\"ch\":6}]]"}
!@%STYLE%@!
Compare `size_t i` and `double A[5]`, which declare variables, with `int main(void)`, which declares a function. The brackets make A an array of five double items. section 2.2
Three practical consequences follow:
- Initialize variables before accessing them so their values are known. Scalar initializers may be expressions; `{0}` initializes object types other than variable-length arrays. section 5.5
- Each function call has its own copy of local variables, including when the function calls itself recursively. section 7.4
- Do not assume every source-level variable survives as storage in the executable. A compiler may remove computations and definitions when it preserves the observable result. section 5.1










