Programming Language C++ MCQ SET-3

C++ Progamming Language MCQs Questions and Answers | SET-3

Important C++ Progamming Language Solved Questions and Answers

Welcome to our exclusive collections of C++ Progamming Language (MCQ) Questions and with answers. Important C++ Progamming Language online MCQs practice test sets questions with answers for interviews, competitive exams. These multiple choice questions(MCQs) on C++ Progamming Language are suitable for both aspirant freshers and experienced who are preparing for competitive exam. In these MCQs sets we are going to share most important questions related to C++ Progamming Language. These questions are very helpful for those candidates ans aspirants who are preparing for the various government and non government exam as well as in interview.

C++ Progamming Language MCQs Questions and Answers | SET-3


Question 21-30

Question : 21

What is the size of empty class?

[A].   0
[B].   1
[C].   2
[D].   4


Question : 22

What is abstract class?

[A].   A class with abstract keyword
[B].   A class with no functions in it
[C].   A class with atleast one pure virtual function
[D].   Empty Class


Question : 23

Can a Structure contain pointer to itself?

[A].   Yes
[B].   No
[C].   Compilation Error
[D].   Runtime Error


Question : 24

Static variable in a class is initialized when _____ .

[A].   every object of the class is created.
[B].   last object of the class is created.
[C].   first object of the class is created.
[D].   No need to initialize static variable.


Question : 25

Which is the Parent class for all exceptions?

[A].   std::bad_exception
[B].   std::logic_error
[C].   std::exception
[D].   std::runtime_error


Question : 26

   Which of the following is the perfect set of operators that can’t be overloaded in CPP ?

[A].   +=, ?, :: , >>
[B].   >>, <<, ?, *, sizeof()
[C].   :: , . , .* , ?:
[D].   :: , ->, * , new, delete


Question : 27

Which part of memory is used for the allocation of local variables declared inside any function.

[A].   Heap
[B].   Stack
[C].   Address Space
[D].   Depends on compiler


Question : 28

   Which of the following is/are valid ways to allocate memory for an integer by dynamic memory allocation in CPP?

[A].   int *p = new int(100);
[B].   int *p; p = new int; *p = 100;
[C].   int *p = NULL; p = new int; *p=100;
[D].   All of these


Question : 29

Car contains Engine. Which type of relationship is it?

[A].   IS-A relation
[B].   HAS-A relation
[C].   None of these
[D].   BOTH [A] AND [B]


Question : 30

How many object can be created of a Class in C++?

[A].   1
[B].   5
[C].   There is no limit
[D].   6





To Read Next Set
Click on below links



Please Read These Useful Post Also
कृपया इन्हें भी पढ़ें


MCQs Practice Sets for Sure Success in all competitive exams



If you are planning to qualify teacher eligibility test, TET, CTET, all India state TET, JEE Main, NEET UG, AIPMT, AIIMS, AFMC, DPMT, BHU, IP MBBS, JIPMER, State PMT, MHT , you can practice these question papers online. We have taken all the necessary care to provide you with genuine question papers and the answers from reliable sources. Hope our labors server student’s community in better way.

Visit  http://examsuccessmaster.blogspot.com/  for a complete list of exam quizzes e.g. Child development, Psychlogy, Inclusive Education, Social Studies, physics || general science MCQ, Himachal pradesh Gk, chemistry, physics, Mathematics, math, General science, computer basics, old question papers, environmental studies,Geography, Polity Social Issue, Social Science complete study material,aptitude tests, Practice sets,HPTET,Engineering Interview, Civil Engineering, Mechanical Engineering, Electrical Engineering, most frequently asked,tests,HPTET Questions and Answers, Engineering Multiple choice, MCQ Questions on various subjects and topics and much more.

No comments:

Post a Comment