Where is a volatile variable stored in the program memory(in which section) ?
volatile
is a type qualifier not a storage class specifier, so it does not determine storage location at all; it affects the definition of a variable's type, not its storage.
It simply forces the compiler to explicitly read a variable whose type is volatile
from the variable's storage location (wherever that may be) rather than assuming that some previously read value in a register for example remains valid.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With