Answer the following questions true (T) or false (F)
1. A constructor is a special kind of member function. It is automatically called when an object of that class is declared.
2. A constructor is always named construct with class name attached. If the class is Foo, then the constructor name is constructFoo.
1. True
Explanation: The purpose of a constructor is to automatically do any needed initialization.
2. False
Explanation. The name of the constructor is just the name of the class.
Computer Science & Information Technology
You might also like to view...
What technology reduces the amount of storage needed to store an organization's data?
A. Data synchronization B. Data deduplication C. File synchronization D. Data duplication
Computer Science & Information Technology
You can retrieve player input using which of the STDIN class's methods?
A. puts B. gets C. retrieve D. catch
Computer Science & Information Technology