Programming Language C++ MCQ SET-16

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

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-16


Question 151-160

Question : 151

While redefining a virtual function in the derived class, if its prototype is changed then ___________________ .

[A].   It will be overloaded by the compiler
[B].   Its virtual nature will be lost
[C].   Both [A] and [B]
[D].   Compiler will generate “Prototype mismatch error”


Question : 152

How can we restrict a function to throw certain exceptions?

[A].   Defining multiple try and catch block inside a function
[B].   Defining generic function within try block
[C].   Defining function with throw clause
[D].   It is not possible in CPP to restrict a function


Question : 153

In a program, If there exists a function template with two parameters and normal function say void add(int , int), so add(3,4) will _____________________ .

[A].   Invoke function template body as it is generic one
[B].   Invokes normal function as it exactly matches with its prototype
[C].   Not be called and Compiler issues warning
[D].   Not be called and Compiler issues ambiguity in calling add()


Question : 154

 Scope resolution operator is used______ .

[A].   to resolve the scope of global variables only
[B].   to resolve the scope of functions of the classes only
[C].   to resolve scope of global variables as well as functions of the classes
[D].   None of these


Question : 155

In case of inheritance where both base and derived class are having constructors, when an object of derived class is created then___________ .

[A].   constructor of derived class will be invoked first
[B].   constructor of base class will be invoked first
[C].   constructor of derived class will be executed first followed by base class
[D].   constructor of base class will be executed first followed by derived class


Question : 156

In case of operator overloading, operator function must be ______ .

1. Static member functions
2. Non- static member functions
3. Friend Functions

[A].   Only 2
[B].   Only 1, 3
[C].   Only 2 , 3
[D].   All 1 , 2, 3


Question : 157

Which of the following is not a file opening mode ____ .

[A].   ios::ate
[B].   ios::nocreate
[C].   ios::noreplace
[D].   ios::truncate


Question : 158

0

[A].   0
[B].   0
[C].   0
[D].   0


Question : 159

Attempting to throw an exception that is not supported by a function call results in calling _____________ library function.

[A].   indeterminate()
[B].   unutilized()
[C].   unexpected()
[D].   unpredicted()


Question : 160

#include iostream.h void Execute(int &x, int y = 200) { int TEMP = x + y; x+= TEMP; if(y!=200) cout«TEMP«x«y"--"; } int main() { int A=50, B=20; cout«A«B«"--"; Execute(A,B); cout«A«B«"--"; return 0; }

[A].   020--5020--
[B].   5020--7012020--12020--
[C].   5020--70120200--5020
[D].   5020--7050200--5020--





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