2
Reply

Can we declare a variable const and volatile both?

Akash Gaur

Akash Gaur

12y
5.6k
0
Reply

    No

    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.