
Dynamic Operators and Constructors 377
Explanation: In the above program, the class city is declared with three-character arrays:
city, state, and country. The class city also has four constructors: zero-argument con-
structor, one-argument constructor, two-argument constructor, and three-argument constructor.
The display() member function is used to display the contents on the screen.
In function main(), c1, c2, c3, and c4 are declared and strings are passed. Accord-
ing to the number of arguments, respective constructor is executed. The function display() is
called by all the four objects and information displayed is as shown in ...