what is the difference between Constant and Volatile
and
What is difference Volatile int i =10 And int i =10;
please let me briefly
what is the difference between Constant and Volatile
and
What is difference Volatile int i =10 And int i =10;
please let me briefly
For a start
int i = 0;
Is not a constant, as it requires the const
keyword. A constant cannot be modified and requires to be initialized (you can't put const int i; i = 10;
)
Volatile [variables] can be modified externally, for example
asm volatile
Would state the the assembly code can be externally modified