What are constant object? How they are declared in c++
Answers
Answered by
0
The object X is declared as constant with one integer value.When object created, the constructor is executed and value is assigned to data member.The object X involves the member function show ().
A constant, like a variable, is a memory location where a value can be stored.Unlike variables,constants never change in the value.You must initialize a constant when it is created.C++ has two types of constants:literal and symbolic.
I hope it is useful.
THANK YOU.
Similar questions