MCQsIntermediate MCQsAbstractionAbstraction 1).What is abstraction in C++?1) Hiding implementation details2) Separating data from methods3) Providing access to all data members4) None of the above 2).Which type of class supports abstraction?1) Abstract class2) Derived class3) Friend class4) None of the above 3).Which keyword is used to declare an abstract class?1) virtual2) abstract3) pure4) None of the above 4).What is the difference between abstraction and encapsulation?1) Abstraction focuses on design, encapsulation focuses on implementation2) Encapsulation hides data, abstraction hides implementation3) Both A and B4) None of the above 5).What is a pure virtual function?1) A function with no implementation2) A function with default implementation3) A function that initializes data members4) None of the above 6).Can an abstract class have a constructor?1) Yes2) No3) Only for derived classes4) None of the above 7).What happens when you try to instantiate an abstract class?1) Compiler error2) A default object is created3) The derived class is instantiated4) None of the above 8).Why are abstract classes used in C++?1) To provide a base for derived classes2) To create objects directly3) To ensure data hiding4) None of the above 9).Can an abstract class have non-pure virtual functions?1) Yes2) No3) Only in derived classes4) None of the above 10).Which of the following is an example of abstraction in C++?1) Using interfaces2) Using private members3) Using inline functions4) None of the above