Computer Science, asked by saishaileshshetty, 10 months ago

Define const object. How it is declared​

Answers

Answered by FRIX
0

Answer:

Const member functions in C++

Like member functions and member function arguments, the objects of a class can also be declared as const. ... A const object can be created by prefixing the const keyword to the object declaration. Any attempt to change the data member of const objects results in a compile-time error.

Explanation:

HOPE IT HELPFUL FOR YOU

Answered by teenapatel
0
When a function is declared as const, it can be called on any type of object, const object as well as non-const objects. Whenever an object is declared as const, it needs to be initialized at the time of declaration. however, the object initialization while declaring is possible only with the help of constructors.




MARK The ANSWER IN BRAINlIEST
Similar questions