Explanation: Constructors are special because its name is same as the class name. The constructor is invoked whenever an object of its associated class is created. It is called constructor because it constructs the value of data members of the class. 7) Which of the following statements about a constructor is not true?
A. We cannot refer to their addresses.
B. They cannot be inherited, though a derived class can call the base class constructor.
C. An object with a constructor can be used as a member of a union.
D. Constructors cannot be virtual.
Answer:A
Explanation: Constructors are special because its name is same as the class name. The constructor is invoked whenever an object of its associated class is created. It is called constructor because it constructs the value of data members of the class. 7) Which of the following statements about a constructor is not true?
A. We cannot refer to their addresses. B. They cannot be inherited, though a derived class can call the base class constructor. C. An object with a constructor can be used as a member of a union. D. Constructors cannot be virtual.
Explanation: An object with a constructor cannot be used as a member of a union. A union is a limited form of the class type. It can contain access specifiers (public, protected, private), member data, and member functions, including constructors and destructors. It cannot contain virtual member functions or static data members. Default access of members in a union is public. A union cannot be used as a base class and cannot be derived from a base class. (same with the constructor too, constructor cannot be inherited, though a derived class can call the basic class constructor). 8) The constructors that can take arguments are called ___________