Technical Discussion :: C++
Home > Freshers > Technical Interview Questions > C++
38. What is a class?
Answer:
Class is a user-defined data type in C++. It can be created to solve a particular kind of problem. After creation the user need not know the specifics of the working of a class.
Asked In :: TCS Virtusa
Class is a user-defined data type in C++. It can be created to solve a particular kind of problem. After creation the user need not know the specifics of the working of a class.
Class is concrete representation of an entity. It represents a group of objects, which hold similar attributes and behavior. It provides Abstraction and Encapsulations.
Classes are created using the keyword class. A class declaration defines a new type that links code and data. This new type is then used to declare objects of that class an object is an instance of a class.
Classes are user defined data types and behave like the built-in type of programming languages. The wrapping up of data and functions into a single unit called class.