Top 1000+ Object Oriented Programming (OOP) Subject Mcqs Pdf Download Set No 08

Print/Downlaod pdf

351.Consider the code below, class class1{ private: void func1(); }; class class2 : private class1 { }; Function func1 of class1 is ____ in class2,

  1. public
  2. protected
  3. private
  4. none of the given options

352.What will be the purpose of a _____ function call is determined at run time.

  1. instance
  2. virtual
  3. operator
  4. none of given

353.Consider the following statements: 1) int iArray[5]; 2) int *pArr = iArray;

  1. These statements will compile successfully
  2. Error in first statement
  3. Error in second statement
  4. None of given options

354.Consider the code below, class class1{ private: int i; }; class class2 : private class1 { }; Then int member i of class1 is ____ in class2,

  1. public
  2. protected
  3. private
  4. none of the given

355.If there is a pointer, p, to objects of a base class, and it contains the address of an object of a derived class, and both classes contain a virtual member function, ding(), then the statement p->ding(); will cause the version of ding() in the ___ class to be executed.

  1. derived
  2. virtual base
  3. implemented

356.The template class  may inherit from another class template.

  1. True
  2. False

357.Derived class can inherit from public base class as well as private and protected to base classes

  1. True
  2. False

358.Two functions with same names, parameters and return type can exist in,

  1. Function overloading
  2. Function overriding
  3. Operator overloading
  4. None

359.Consider the code below, class class1{ private: int i; }; class class2 : public class1 { }; Then int member i of class1 is ____ in class2,

  1. public
  2. protected
  3. private
  4. none of the given

360.Purpose of a _____ function call is determined at run time.

  1. virtual
  2. instance
  3. operator
  4. none

361.A class template may inherit from another class template.

  1. True
  2. False

362.A function call is resolved at run-time in_________

  1. non-virtual member function
  2. virtual member function
  3. Both non-virtual member and virtual member function.
  4. None of given

363.A class hierarchy

  1. shows the same relationships as an organization chart.
  2. describes “has a” relationships.
  3. describes “is a kind of” relationships.
  4. shows the same relationships as a family tree.

364.Consider the code below, class class1{public: int i; }; class class2 : public class1 { }; Then int member i of class1 is ____ in class2,

  1. public
  2. protected
  3. private
  4. none of the given options

365.Consider the code below, class c1{ }; class c2 : public c1 { }; class c3 : public c2 { }; Then c1 is,

  1. Direct base class of c3
  2. Direct child class of c3
  3. Direct base class of c2
  4. Direct child class of c2

366.A class can inherit from more then one class is called.

  1. Simple inheritance
  2. Multiple inheritances
  3. Single inheritance
  4. Double inheritance

367.template<> class Vector void** p; //…. void*& operator[] ((int i); };

  1. This specialization can then be used as the common implimentation for all Vectors of pointers.
  2. This spcialization can then be used as the all type implimentation for one type classes.
  3. This specialization can then be used double type pointers.
  4. This specialization should be used for Vectors of all type int types.

368.Consider the code below, class class1{ public: int i; }; class class2 : protected class1 { }; Then int member i of class1 is ____ in class2,

  1. public
  2. protected
  3. private
  4. none of the given options

369.Consider the code below, class class1{ private: void func1(); }; class class2 : public class1 { }; Function func1 of class1 is ____ in class2,

  1. public
  2. protected
  3. private
  4. none of the given options

370.Templates automatically create different versions of a function?

  1. False
  2. True

371.In OOP  the Binding means that target function for a call is selected at run time

  1. Automatic
  2. Dynamic
  3. Static
  4. Dramatic

372.When we create objects, then space is allocated to:

  1. Member function
  2. Access specifies
  3. Data member
  4. None of given

373.The copy constructor will be its form?

  1. True
  2. False

374.Which features of OOP is used to deal with only relevant details?

  1. Abstraction
  2. Object
  3. Information hiding
  4. none

375.___________ Binding means that targets function for a call is selected at compile time.

  1. Static
  2. Dynamic
  3. Automatic
  4. None of given

376.A Class hierarchy

  1. What will be  same relationships as an organization chart
  2. Describes “has a” relationships.
  3. Describes “is a kind of” relationships.
  4. Shows the same relationships as a family tree

377.We can make virtual by preceding the function header with keyword “Inline”.

  1. True
  2. False

378.The illegal way to make objects of one class members of another class.

  1. True
  2. false

379.How compiler will search the Resolution order?

  1. Generic Template
  2. Partial Specification
  3. Complete Specification
  4. Ordinary function

380.Derived class can inherit from public base class as well as private and protected base classes

  1. True
  2. False

381.Which line will produce error. Class phone: Private Transmit, private Receiver { } 1.int main () 2. { 3.phone obj; 4.Tranmit*obj1 = &obj;

  1. 5.Received obj2 = &obj; 6.}
  2. 4th line will produce error
  3. 3rd and 4th line will produce error.
  4. 5th line will produce error
  5. 3rd line will produce error

382.What will the procedure for the development of reusable software relate to ____________.

  1. Structure programming
  2. Procedural programming
  3. Generic programming
  4. None of the given

383.The argument of template preceded by the keyword__________.

  1. Vector
  2. Class
  3. Template
  4. Type*

384.Friends are used exactly the same for template and non-template classes.

  1. True
  2. False

385.A function template must have a parameter

  1. True
  2. False

386.Child class will call constructor of its,

  1. Direct base class
  2. Indirect base class
  3. Both direct and indirect base classes
  4. None of these.

387. Which statement will be true for concrete class?

  1. It implements virtual concept.
  2. It cannot be instantiated
  3. None of given
  4. It can be instantiated

388.A class D can be derived from a class C, which is derived from a class B, which is derived from a class A

  1. True
  2. False

 389.The information of derived class to a base class requires fundamental changes to the base class.

  1. False
  2. True

390.A Class or class template can have member ___________ that are themselves templates.

  1. Variable
  2. Function
  3. Objects
  4. None of given

391.Which will be the task of generic programming?

  1. Categorize the abstractions in a domain into concepts
  2. Implement generic algorithms based on the concepts
  3. Build concrete models of the concepts
  4. All of given

392.The default inheritance mode will be?

  1. Protected Inheritance
  2. Private Inheritance
  3. None of these option
  4. Public inheritance

393. If there is a pointer, p, to objects of a base class, and it contains the address of an object of a derived class, and both classes contain a virtual member function, ding(), then the statement p->ding(); will cause the version of ding() in the __________class to be executed.

  1. Base
  2. Derived
  3. Virtual
  4. Implemented

394.Sender of the message does not need to know the exact class of receiver in________.

  1. Abstraction
  2. Polymorphism
  3. Inheritance
  4. none of the given

395.___ is a relationship.

  1. Polymorphism
  2. abstraction
  3. Inheritance
  4. encapsulation

396. which condition will be satisfying of polymorphism.

  1. Carbon
  2. Diamond
  3. Coal
  4. all of the given

397. A generalization-specialization relation between classes are implemented using

  1. data hiding
  2. friend classes
  3. encapsulation
  4. inheritance

398. In order to free the memory occupied by the object, we use?

  1. Constructor
  2. Destructor
  3. Shallow Copy
  4. Deep Copy

399. Which of the following is not an example of multiple inheritances?

  1. Mermaid
  2. Woman
  3. None of the given
  4. Amphibious Vehicle

400.A generic class showing all the common attributes and a behavior of other classes represents a very important feature in OOP called

  1. Inheritance
  2. Polymorphism
  3. Encapsulation
  4. Abstraction