The correct answer is:
(c) To create instance of class
Explanation:
In object-oriented programming (OOP), an object is an instance of a class. A class serves as a blueprint for creating objects, and each object created from the class contains the attributes (data) and methods (functions) defined by the class.
- Option (a): Objects are not used to create instances of functions; they may call or use functions, but not create them.
- Option (b): An object does not create an instance of a program; it creates an instance of a class.
- Option (d): Structures are different from classes, and objects are not used to create instances of structures.
Thus, the primary role of an object is to create an instance of a class, making (c) the correct choice.