Searching for "qualifiers"

Q:

Explain storage qualifiers in C++

Answer

i.) Const - This variable means that if the memory is initialised once, it should not be altered by a program. 


ii.) Volatile - This variable means that the value in the memory location can be altered even though nothing in the program code modifies the contents. 


iii.) Mutable - This variable means that a particular member of a structure or class can be altered even if a particular structure variable, class, or class member function is constant.

Report Error

View answer Workspace Report Error Discuss

Subject: C++

Q:

What are storage qualifiers in C++ ?

Answer

ConstKeyword indicates that memory once initialized, should not be altered by a program.
Volatile keyword indicates that the value in the memory location can be altered even though nothing in the program.
Mutable keyword indicates that particular member of a structure or class can be altered even if a particular structure variable, class, or class member function is constant.

Report Error

View answer Workspace Report Error Discuss

Subject: C++