πŸ“Š C++
Q. Which of the following statements about constructors in C++ is false?
  • (A) A constructor has the same name as the class.
  • (B) A constructor does not have a return type.
  • (C) A constructor can be private.
  • (D) A constructor must be explicitly called when creating an object.
πŸ’¬ Discuss
βœ… Correct Answer: (D) A constructor must be explicitly called when creating an object.

Explanation: A constructor is automatically called when an object is instantiated.

Explanation by: Admin
A constructor is automatically called when an object is instantiated.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
145
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Admin
Publisher
πŸ“ˆ
86%
Success Rate