
108 C++ Declarations
// p=“xxx”; // can not modify a constant object
cout<<“\n”<<p;
}
OUTPUT
Constant
1
ABC
(4) Constants can be defined using enum as follows:
Example:
enum {a,b,c};
where a,b, and c are declared as integer constants with values 0, 1, and 2, respectively.
We can also assign new values to a, b, and c.
enum [a=5,b=10,c=15};
where a, b, and c are declared as integer constants with values 5,10,and 15, respectively.
4.2.4 Operators
C++ supports all the operators of ‘C’. In addition, C++ introduces few more operators. The new
operators are <<, >>, ::, ::*, ->*,.*, delete, new, etc.
These operators are discussed in detail at the end of this ...