Volatile is a qualifier that is applied to a variable when it is declared. It tells the compiler that the value of the variable may change at any time-without any action being taken by the code the compiler finds nearby. Syntax:
To declare a variable volatile, include the keyword volatile before or after the data type in the variable definition.
volatile int foo;
int volatile foo;