MCQsIntermediate MCQsEncapsulationEncapsulation 1).What is encapsulation in C++?1) Bundling data and methods together2) Inheritance of data members3) Separating data from methods4) None of the above 2).Which access specifier provides the highest level of protection?1) private2) protected3) public4) None of the above 3).What is the main purpose of encapsulation?1) Data hiding2) Memory management3) Inheritance4) None of the above 4).Which of the following is true about encapsulation?1) Encapsulation allows direct access to data2) Encapsulation separates data from behavior3) Encapsulation combines data and methods4) None of the above 5).How is encapsulation implemented in C++?1) Using access specifiers2) Using constructors and destructors3) Using templates4) None of the above 6).Which access specifier allows inheritance but restricts direct access?1) protected2) private3) public4) None of the above 7).What is the difference between encapsulation and abstraction?1) Encapsulation hides implementation, abstraction hides complexity2) Abstraction focuses on design, encapsulation focuses on security3) Both A and B4) None of the above 8).Can private members of a class be accessed outside the class?1) No2) Yes3) Only using friend functions4) None of the above 9).What is a getter function?1) A function to access private data2) A function to modify private data3) A function to initialize private data4) None of the above 10).Why is encapsulation considered a pillar of OOP?1) It protects object integrity2) It allows data hiding3) It provides a clear interface4) All of the above