• Home
  • Recent Q&A
  • Java
  • Cloud
  • JavaScript
  • Python
  • SQL
  • PHP
  • HTML
  • C++
  • Data Science
  • DBMS
  • Devops
  • Hadoop
  • Machine Learning
in C Plus Plus by
Q:

Explain the purpose of the keyword volatile.

1 Answer

0 votes
by

Declaring a variable volatile directs the compiler that the variable can be changed externally. Hence avoiding compiler optimization on the variable reference.

Related questions

+2 votes
asked Jan 21 in C Plus Plus by SakshiSharma
0 votes
asked Nov 24, 2020 in C Plus Plus by sharadyadav1986
...