|1 Crore+ students have signed up on EduRev. Have you?|
Wrapping data and its related functionality into a single entity is known as _____________
In OOPs, the property of enclosing data and its related functions into a single entity(in C++ we call them classes) is called encapsulation.
What does polymorphism in OOPs mean?
In OOPs, Polymorphism is the concept of allowing a user to override functions either by changing the types or number of parameters passed.
How access specifiers in Class helps in Abstraction?
Abstraction is the concept of hiding things from the outer world and showing only the required things to the world, which is where access specifiers private, protected and public helps in keeping our knowledge hidden from the world.
What does modularity mean?
Modularity means dividing a program into independent sub programs so that it can be invoked from other parts of the same program or any other program.
Which of the following class allows to declare only one object of it?
Singleton class allows the programmer to declare only one object of it, If one tries to declare more than one object the program results into error.
Which of the following is correct?
C++ does not allow a derived class pointer to point a base class pointer whereas Base class can point to a derived class object. Both base class and derived class can have pointer objects.
What is the other name used for functions inside a class?
Functions of a class are also known as member functions of a class.
Why references are different from pointers?
References cannot be made null whereas a pointer can be. References cannot be changed whereas pointers can be modified.
Pointers need * operator to dereference the value present inside it whereas reference does not need an operator for dereferencing.
How many types of polymorphism are there in C++?
There are two types of polymorphism in C++ namely run-time and compile-time polymorphisms.
How compile-time polymorphisms are implemented in C++?
Compile-time polymorphism is implemented using templates in which the types(which can be checked during compile-time) are used decides which function to be called.
Which concept means the addition of new components to a program as it runs?
Dynamic loading is the concept of adding new components to a program as it runs.
Which of the following explains the overloading of functions?
Ad-hoc polymorphism is a type of polymorphism in which a function denotes heterogeneous implementation depending upon the types of argument.
Which of the following approach is used by C++?
C++ is an object-oriented language and OOL uses a bottom-up approach to solve/view a problem.
Which of the following is not a type of Constructor?
Friend function is not a constructor whereas others are a type of constructor used for object initialization.
Out of the following, which is not a member of the class?
Friend function is not a member of the class. They are given the same access rights as the class member function have but they are not actual members of the class.