Print pyramid triangle in C++
Answer : To print pyramid triangle in C++, we have use two for loop...
C++ Inheritance
Answer : Inheritance is one of the key features of Object-oriented programming...
Dangling Pointer ?
Answer : A dangling pointer is pointing to a memory location...
Finding all substrings of a given number that are divisible by 11
Answer : Query(l, r) : find if the sub-string between the indices l and r....
What is the best way to sort an array of 0s and 1s ?
Answer : Sort an array elements means arrange...
Find Largest number from set of given numbers ?
Answer : Find number of digits in the largest number. Let us assume number of digits be n...
The operator when overloaded in a class ?
Answer : B. Ad-hoc polymorphism
Syntax for Pure Virtual Function is ?
Answer : D. void virtual show()=0
Find the wrong statement about Abstract Class ?
Answer : B. We can’t create pointers to an abstract class
A virtual function that has no definition within the base class is called ?
Answer : A. Pure virtual function
Which of the following statements about virtual base classes is correct ?
Answer : B. It is used to avoid multiple copies of base class in derived class.
Which of the following concepts means wrapping up of data and functions together ?
Answer : B. Encapsulation
Which of the following can access private data members or member functions of a class ?
Answer : C. Any member function of that class.
What is pure virtual function in C++ ?
Answer : A virtual function will become pure virtual function...
State whether the following statements about inheritance are True or False.
Answer : C. True, True
Encapsulation is ?
Answer : C. Reduce Complexity
Which of the following concepts of OOPS means exposing only necessary information to client ?
Answer : C. Data Hiding