πŸ“Š C++
Q. Which of the following is true about constructors in C++?
  • (A) They have the same name as the class
  • (B) They do not have a return type
  • (C) They are automatically called when an object is created
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the above

Explanation: Constructors in C++ have the same name as the class, do not have a return type, and are automatically invoked when an object is instantiated.

Explanation by: Ram Sharma
Constructors in C++ have the same name as the class, do not have a return type, and are automatically invoked when an object is instantiated.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
160
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
99%
Success Rate