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

Print/Downlaod pdf

501.Which is a weak relationship between two objects?

  1. Aggregation
  2. Inheritance
  3. Composition
  4. None of given

 502.Data items in a class will be private?

  1. False
  2. True
  3. All
  4. none

503 The class association?

  1. Simple Association
  2. Composition
  3. Aggregation
  4. Inheritance

504. If there will be an object of type Person, which of the following will be considered as one of its attributes

  1. Both Name and Age
  2. Name
  3. Age
  4. Work ()

505.Which is not an object association?

  1. Simple association
  2. Aggregation
  3. Association
  4. Inheritance

506. We can achieve encapsulation

  1. Least interdependencies among modules
  2. Implementation independence
  3. Information hiding
  4. All of given options

507.In…. constant member function will be the type of this pointer?

  1. Constant pointer
  2. Constant pointer to class
  3. Constant pointer to constant object
  4. Constant pointer to object

508.Which way will be used to extract common behavior and attributes from the given classes and attribute

  1. Sub-typing
  2. Generalization
  3. Specialization
  4. Extension

509. To derive a class from more than one class is called

  1. Single inheritance
  2. Multiple inheritance
  3. Encapsulation
  4. Polymorphism

510.If MY Class has a destructor what will be its named of destructor?

  1. My Class
  2. ~MY Class
  3. My       Class
  4. My          Class~

511.Class XYZ…. Is a valid class declaration?

  1. False
  2. True
  3. None
  4. all

512.Without using Deep copy constructor?

  1. System crash
  2. Memory Leakage
  3. Dangling pointer
  4. all

513.If only one behavior of a derived class is incompatible with base class, then it is?

  1. Specialization
  2. Generalization
  3. Extension
  4. Inheritance

 514. The tangible things can be as an object?

  1. True
  2. False

515.Which will be different forms of a single entity exist?

  1. Aggregation
  2. Polymorphism
  3. Encapsulation
  4. Composition

516. Encapsulation purpose?

  1. Extending the behavior of a class in another class
  2. One entity takes all the attributes and operations of the other
  3. Data and behavior are tightly coupled within an object
  4. Taking out the common features and put those in a separate class

517.  How can visualize our programming problems according to real life’s problems is called ___

  1. Structure Programming
  2. Object Oriented Programming
  3. Procedural Programming
  4. Sequential Programming

518. There will be no need of “is a” or “is a kind of” relationship in Generalization.

  1. True
  2. False

519. The behavior of a derived class I will be incompatible with base class?

  1. none
  2. Extension
  3. Specialization
  4.  Encapsulation

520. What will be hiding of unwanted details from users is called __

  1. Encapsulation
  2. Protection
  3. Argumentation
  4. Abstraction

521.  The automatically…. Will be called when the object will be created.

  1. all
  2. object
  3. None

522.  It provides the facility to access the data member.

  1. private function
  2. Access function
  3. inline function
  4. None

523. The concept of derived classes is?

  1. inheritance
  2. encapsulation
  3. structure
  4. array

524. Which part of an object exhibits its state?

  1. Operations
  2. Data
  3. Any public part
  4. Any private part

525. Inheritance will be for?

  1. organize data
  2. add features to existing classes without rewriting them
  3. pass arguments to objects of classes
  4. improve data-hiding and encapsulation

526. Which problem will be occurred when we will use copy objects without using deep copy constructor?

  1. Dangling pointer
  2. Memory leakage
  3. All of given
  4. System crash

527. This pointer will not accessible for static member functions?

  1. True
  2. False

528. A static member function cannot be declared

  1. Virtual
  2. none
  3. Implicit
  4. Explicit

529.It will remain in memory even when all objects of a class will be destroyed

  1. Instance variables
  2. Static variables
  3. Primitive variables
  4. None

530. Friend functions are functions of a class

  1. non-member
  2. Object member
  3. data member
  4. None

531. Which means if X declares Y as its friend, it does NOT mean that X can access private data of Y. It only means that Y can access all data of X

  1. Friendship is one way only
  2. Friendship is two waye only
  3. No friendship between classes
  4. Any kind of friendship

532. The statement object A=object B; will cause a compiler error if the objects are of different classes.

  1. False
  2. True

533. Which of the following overloaded operator function’s declaration is appropriate for the given call?

Rational_number_1+2.325

  1. Rational number operator+ (double& obj);
  2. Where Rational_number_1 is an object of user defined class Rational _number.
  3. Rational-number operator+ (Rational-number& obj);
  4. Rational_ number operator+ (Rational_ number &obj, double& num);
  5. operator+ (double &obj);

534. Which operator cannot be overloaded?

  1. The relation operator (>=)
  2. Conditional operator (?)
  3. Assignment operator (=)
  4. Script operator ([])

535. Memory will be allocated to none static members?

  1. Class is created
  2. Object is created
  3. Object is defined
  4. Object is initialized    

  1.  

536. Consider the following code segment?

class test

{

int a;

int b;

int c;

public:

test(); b(5).c(a).a(b){}}

  1. 5, 5, 5
  2. 5, Junk value, 5
  3. Junk value, 5, 5
  4. Junk value, 5, Junk value

537.The static variable int type then it is automatically initialized with?

  1. 1
  2. 0
  3. Null
  4. None

538. In OOP, objects communicate with each other through?

  1. Messages
  2. Data members
  3. Voice chat
  4. Ports

539. We can create array of objects through new operator?

  1. We can call overloaded constructor through new
  2. We can’t call overloaded constructor through new
  3. We can call default constructor through new
  4. None y

540when a base class can be replaced by the derived class then it is called

  1. sub-typing
  2. super-typing
  3. Generalization
  4. Specialization

541. Two methods cannot be declared virtual?

  1. Private, Static
  2. Private, Public
  3. Static, Public
  4. None

542. Separation of implementation from interface provides?

  1. Data Member
  2. Data Function
  3. Class
  4. None

543. We can access a private static variable through?

  1. Static data member
  2. Static member function
  3. Global data member
  4. None

544. Consider the call given below of an overloaded operator “+”

Rational_number_1 + Rational_number_2

Where Rational_number_1 and Rational_number_2 are two objects of Rational number class (a user defined class). Identify which of the above two objects will be passed as an argument to the overloaded operator function?

  1. Rational_number_1
  2. None
  3. Both Rational_number_1 & Rational_number_2
  4. any of the two objects, randomly

545. Static member cannot be called with the class name?

  1. True
  2. False

546. In a class declaration, functions designated private are accessible

  1. to any function in the program
  2. only if you know the password
  3. to member functions of that class
  4. only to public members of the class

547. A___ keyword tells the compiler to substitute the code within the function definition for every instance of a function call

  1. virtual
  2. inline
  3. instance
  4. None

548. The >= operator can’t be overloaded.

  1. True
  2. False

549. The merits of inheritance is:

  1. Better understanding
  2. Less understanding
  3. Reuse
  4. Less complexity

550. An instance of user defined type?

  1. Object
  2. Class
  3. Variable
  4. Program