in C Plus Plus by

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, 2021 in C Plus Plus by SakshiSharma
0 votes
asked Nov 24, 2020 in C Plus Plus by sharadyadav1986
+2 votes
asked Jun 19, 2019 in C Plus Plus by anonymous
...