 
                 
                InterviewSolution
| 1. | Explain how objects of a class can be defined? | 
| Answer» The objects are declared after a class is defined. The object declaration create object of that class and memory is allocated for the created object. The object are created using the following syntax: here, getadata() is the member function of a class student and function call is give using object obj1 which assign the value 5 and 25 to the data members of the class. The memory is allocated separately for data members of each object. | |