Which feature of C++ allows a program to create objects from a user-defined data type?

Options

  • A. Function
  • B. Class
  • C. Loop
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

B. Class

Detailed Explanation

Answer: Class

A class is a user-defined data type in C++. It acts as a blueprint for creating objects.

For example, a class named Student can be used to create multiple Student objects. A class can contain data members and member functions.