Interviews2 answers
Can we declare a variable const and volatile both?
2 Answers
No
Neha KumariPosted Nov 5, 2017, 8:44 AM EST
Yes, in C/C++ you can declare a variable to be both const and volatile.
When you do so, it means that the variable can't be modified by the current program but may be modified by an external process.
VulpesPosted Feb 28, 2012, 1:30 AM EST
