give me the detail about volatile , applications, how to use volatile variable
Normally you do not use it.
It means: tell the compiler to check the variable's contents because it could have changed since that last time it was referenced by your code- by external code, for example. It might be used in some threaded applications.
Generally, it has a negative impact on compiler optimization, and code performance.
where do we use volatile variable ., what are the different applications.