September 2001
Beginner
970 pages
23h 20m
English
Use the following keywords to qualify variables:
const, volatile, restrict
A qualifier constrains a variable's use in some way. A const variable, after it's initialized, can't be altered. The compiler can't assume that a volatile variable hasn't been changed by some outside agency, such as a hardware update. A pointer qualified with restrict is understood to provide the only access (in a particular scope) to a block of memory.
Note
![]() | The declaration const int joy = 101; establishes that the value of joy is fixed at 101. The declaration volatile unsigned int incoming; establishes that the value ... |
Read now
Unlock full access