The volatile keyword is used in C to inform the compiler that the value of a variable may change unexpectedly and independently of the normal program flow.
It serves as a hint to the compiler to avoid certain optimizations that could lead to incorrect behavior when accessing or modifying that variable.
Syntax:
volatile int Data;
int volatile Data;