1 Crore+ students have signed up on EduRev. Have you? |
The classes in C++ encapsulates(i.e. put together) all the data and functions related to them for manipulation.
How many specifiers are present in access specifiers in class?
There are three types of access specifiers. They are public, protected and private.
Which other keywords are also used to declare the class other than class?
Struct and union take the same definition of class but differs in the access techniques.
A class declaration terminates with semicolon and starts with class keyword. only option (a) follows these rules therefore class A { int x; }; is correct.
The data members and functions of a class in C++ are by default ____________
By default all the data members and member functions of class are private.
Once the object is declared means, the constructor are also declared by default.
When struct is used instead of the keyword class means, what will happen in the program?
For structures, by default all the data members and member functions are public.
Fundamental/Atomic data type includes int, char, float, double and void. Derived data type includes arrays, pointers, references, function and constants. User defined derived data type includes class, structure, union and enumeration.
How the objects are self-referenced in a member function of that class.
In Classes objects are self-referenced using this pointer inside the member functions. for example this->value to access the data member value of that object.
Mutable members are those which can be updated even if it a member of a constant object. You can change their value even from a constant member function of that class.
15 videos|20 docs|13 tests
|
Use Code STAYHOME200 and get INR 200 additional OFF
|
Use Coupon Code |
15 videos|20 docs|13 tests
|
|
|
|
|
|
|
|
|
|