Classes and Inheritance MCQs in C++ – OOP

By: Prof. Dr. Fazal Rehman | Last updated: May 2, 2025

22
Score: 0
Attempted: 0/22
Subscribe
1. : We can access which kind of data members in the derived class?



2. : We can’t access which kind of data members in the derived class?



3. : We can access which kind of data members outside the class?



4. : We can’t access which kind of data members outside the class?



5. : Which of the following is the correct syntax to declare a class?



6. : Which of the following is the correct syntax to declare a class?



7. : Which of the following is the correct syntax to declare data members in a class?



8. : Which of the following is the correct syntax to define a function for a class?



9. : What is the correct syntax to declare object for a class?



10. : How many ways to use existing classes to define a new class?



11. : Composition is called a ___________.



12. : When a data member of the new class is an object of another class is called ___________.



13. : We can define a new class from an existing class, which of the following is used?



14. : Use of one or more classes within the definition of another class is also called ___________.



15. : Using keywords as an identifier causes is called ________.



16. : Rectangle symbol in flowchart is called _________.



17. : All keywords bool, catch, private, public, this and throw are introduced in ____________.



18. : First object-oriented language ‘Smalltalk’ appeared in _________ year.



19. : A member function will access data and return value to the user when it is __________.



20. : Data in an object-oriented language is safe from accidental alteration as it is __________.



21. : If we want to read a data item in an object, the member function in an object is __________.



22. : Data encapsulation and data hiding are key features of __________.



 

Access Specifiers Private Protected Public
Access in same class YES YES YES
Access in derived class NO YES YES
Access outside the class NO NO YES

 

OOP MCQs 

Programming C Plus Plus MCQs

  1. Top 50 Programming  C++ Solved MCQs Questions Answers
  2. Mcq’s of introduction to programming
  3. C++ Mcq’s
  4. C++ Array  MCQs 
  5. Arrays MCQs 2
  6. Pointers Solved MCQs
  7. Advanced C Plus Plus MCQs
  8. Advanced c++ multiple choice question
  9. Programming c++ MCQs for a Programming competition
  10. C++ STANDARD LIBRARY MCQs
  11. Classes and Inheritance MCQs
  12. Polymorphism Mcqs
  13. Operator overloading MCQs

Computer Science Repeated MCQs Book Downloadshamil memory table

Programming C Plus Plus MCQs Homepage

shamil memory table

Leave a Comment

All Copyrights Reserved 2025 Reserved by T4Tutorials