Answer Posted / shakti singh khinchi
Mutable keyword is used to modify a data member of an object
which has declared as constant. for example:
class XYZ
{
public:
int i;
mutable int cc;
public:
XYZ();
};
int main()
{
const XYZ obj;
obj.cc = 100; // modify obj object's member "cc" which has
been declared as mutable.
}
Is This Answer Correct ? | 16 Yes | 7 No |
Post New Answer View All Answers
Explain the difference between c++ and java.
Which bitwise operator is used to check whether a particular bit is on or off?
What do you mean by funtion prototype?
Why are pointers not used in c++?
Write a function to find the nth item from the end of a linked list in a single pass.
Explain the operation of overloading of an assignment operator.
What do you mean by storage classes?
What does flush do c++?
Why c++ is the best language?
What is the use of c++ programming language in real life?
What is the difference between structures and unions?
Write about the role of c++ in the tradeoff of safety vs. Usability?
What are formatting flags in ios class?
What is command line arguments in C++? What are its uses? Where we have to use this?
Which bit wise operator is suitable for checking whether a particular bit is on or off?