2
Reply

Can we declare a variable const and volatile both?

Akash Gaur

Akash Gaur

Feb 16, 2012
5.6k
0

    No

    Neha Kumari
    November 05, 2017
    0

    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.

    Vulpes
    February 28, 2012
    0