Amazon Interview Question
Software Engineer / DevelopersA class is a blueprint of an object. A class defines a collection of datatypes, storage types of the defined datatypes and the functions/operations that can be performed on the datatypes as well on the whole class itself. A object is an instantiation/creation of the datatypes defined in the class complying to the rules specified in the class definition. For Ex: instantiation of static & instance variables etc.
A class is a user defined data type consisting of data and member functions. It is the basis of encapsulation in C++.
- Amulya Potineni September 23, 2005Object is an instance of a class.