Object Oriented Programming using C++ Questions and Answers – Public Access Specifier

This set of Object Oriented Programming (OOPs) using C++ Multiple Choice Questions & Answers (MCQs) focuses on “Public Access Specifier”. 1. Which among the following is true for the code given below? class A { int marks; public : disp() { cout<<marks; } } class B: protected A { char name[20]; } A a; a.disp(); … Read more

advertisement

Object Oriented Programming using C++ Questions and Answers – Protected Access Specifier

This set of Object Oriented Programming using C++ Question Bank focuses on “Protected Access Specifier”. 1. Which among the following best describes the protected specifier? a) Members are most secure and can’t be used outside class b) Members are secure but can be used outside the class c) Members are secure as private, but can … Read more

advertisement

Object Oriented Programming using C++ Questions and Answers – Private Access Specifier

This set of Object Oriented Programming (OOPs) using C++ Multiple Choice Questions & Answers (MCQs) focuses on “Private Access Specifier”. 1. If a function has to be called only by using other member functions of the class, what should be the access specifier used for that function? a) Private b) Protected c) Public d) Default … Read more

advertisement

Object Oriented Programming using C++ Questions and Answers – Access Specifiers

This set of Object Oriented Programming (OOPs) using C++ Multiple Choice Questions & Answers (MCQs) focuses on “Access Specifiers”. 1. How many types of access specifiers are provided in OOP (C++)? a) 1 b) 2 c) 3 d) 4 2. Which among the following can be used together in a single class? a) Only private … Read more

advertisement

Object Oriented Programming using C++ Questions and Answers – Destructors

This set of Object Oriented Programming (OOPs) using C++ Multiple Choice Questions & Answers (MCQs) focuses on ” Destructors”. 1. Which among the following describes a destructor? a) A special function that is called to free the resources, acquired by the object b) A special function that is called to delete the class c) A … Read more

advertisement

Object Oriented Programming using C++ Questions and Answers – Execution of Constructor or Destructor

This set of Object Oriented Programming using C++ Questions and Answers for Experienced people focuses on “Execution of Constructor or Destructor”. 1. Which among the following best describes the constructors? a) A function which is called whenever an object is referenced b) A function which is called whenever an object is created to initialize the … Read more

advertisement

Object Oriented Programming using C++ Questions and Answers – Overloading Constructors

This set of Object Oriented Programming (OOPs) using C++ Multiple Choice Questions & Answers (MCQs) focuses on “Overloading Constructors”. 1. Which among the following best describes constructor overloading? a) Defining one constructor in each class of a program b) Defining more than one constructor in single class c) Defining more than one constructor in single … Read more

advertisement

Object Oriented Programming using C++ Questions and Answers – Copy Constructor

This set of Basic Object Oriented Programming using C++ Questions and Answers focuses on “Copy Constructor”. 1. Copy constructor is a constructor which ________________ a) Creates an object by copying values from any other object of same class b) Creates an object by copying values from first object created for that class c) Creates an … Read more

advertisement

Object Oriented Programming using C++ Questions and Answers – Types of Constructors

This set of Object Oriented Programming using C++ online quiz focuses on “Types of Constructors”. 1. How many types of constructors are available, in general, in any language? a) 2 b) 3 c) 4 d) 5 2. Choose the correct option for the following code. class student { int marks; } student s1; student s2=2; … Read more

advertisement

Object Oriented Programming using C++ Questions and Answers – Constructors

This set of Object Oriented Programming (OOPs) using C++ Multiple Choice Questions & Answers (MCQs) focuses on “Constructors”. 1. Which among the following is called first, automatically, whenever an object is created? a) Class b) Constructor c) New d) Trigger 2. Which among the following is not a necessary condition for constructors? a) Its name … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.