Q. Which of the following is the correct way to create an object of a class in C++?
β
Correct Answer: (D)
ClassName obj;
Explanation: In C++, objects are created using the class name followed by the object name, like 'ClassName obj;'.