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

Print/Downlaod pdf

401. How can get only one unique value  of the class?

  1. dynamic variables
  2. static variables
  3. instance variables
  4. data members

402. A member function having the same name as that of a class and a ~ sign with it is called,

  1. Constructor
  2. Getter
  3. Setter
  4. Destructor

403. How encapsulation can achieve?

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

404.Question:  The way of Inheritance

  1. pass arguments to objects of classes.
  2. improve data hiding and encapsulation.
  3. make general classes into more specific classes.
  4. providing class growth through natural selection.

405. The common behavior of class, we can save effort by placing the common behavior in a ___.

  1. Derived Class
  2. Base class
  3. Deprived Class
  4. Named class

406. Which of the following are advantage of OOP?

  1. OOP makes it easy to re-use the code.
  2. It provides an ability to create one user defined data type by extending the other.
  3. It provides the facility of defining Abstract data types through which real world entities can be defined better.
  4. All of the given options

407. The example of OOP is an example?

  1. Data Type
  2. Abstract Type
  3. User Defined Type
  4. None of the given

408. How class can be identified from a statement by?

  1. Pronoun
  2. Verb
  3. Noun
  4. Adverb

409.The members of a class that can be accessed without creating the object of the class is called

  1. Private member
  2. Data Member
  3. Public Member
  4. Static

410. Suppose there is an object of type Person, which of the following can be considered as one of its attributes

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

411. How can derived class can add?

  1. New data members
  2. New member functions and new friend functions
  3. New constructors and destructor
  4. All of given

412. ____ is used to access information hidden within an object?

  1. Interface
  2. Private data members
  3. Private member functions
  4. Both public and private members

413. Given the following class

class Base {

int Age=33;

}

  1. Yes
  2. no

414.How you can improve above class with respect to accessing the field Age?

  1. Define the variable Age as private
  2. Define the variable Age as protected
  3. Define the variable Age as private and create a get method that returns it and a set method that updates it
  4. Define the variable Age as protected and create a set method that returns it and a get method that updates it

415.Which of the following  overloaded operators always takes no argument ?

  1. 1: /
  2. 2: +
  3. 3: –
  4. 4: ++

416. Assume a class C with objects obj1, obj2, and obj3. For the statement obj3 = obj1 – obj2 to work correctly, if the overloaded –

  1. operator must
  2. take two arguments
  3. return a value
  4. create a named temporary object
  5. take four arguments

  417.How can we achieve independence of internal implementation from its external interface through———–.

  1. Encapsulation
  2. Information Hiding
  3. Abstraction
  4. both encapsulation and information hiding

418.Which one of the following is not an object association? Simple Association

  1. Inheritance
  2. Aggregation
  3. Composition

419. How can we capture the object attributes and behavior in Object Oriented programming using?

  1. Class
  2. Function
  3. Data Members
  4. Instances

420. The return type of a constructor is?

  1. Integer
  2. Character
  3. Double
  4. No type

421. Which one of the following terms best represents the statement given below Hiding information?

  1. Obfuscation
  2. Data Mining
  3. Compilation
  4. Encapsulation

422.The process of hiding unwanted details?

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

423.What will properties of employee in an organization

  1. Name
  2. Past experience
  3. Age
  4. Relatives

424. Hobbies in spare time Keeping in view the principle of abstraction, which of the above information the company needs to save employee’s record?

  1. 1: 2, 4
  2. 2: 1, 3, 5
  3. 3: 1, 2, 3
  4. 4: 1, 2, 3, 4

425.What will the concept of derived class?

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

426.Which construct is the source for the creation of an object?

  1. Destructor of the class
  2. New operator
  3. Delete operator
  4. Constructor of the class

426.When a variable is defined as static in a class then all object of this class,

  1. Have different copies of this variable
  2. Have same copy of this variable
  3. Cannot access this variable
  4. None of given

427.The life of sub object is not dependent on the life of master class in?

  1. Composition
  2. Aggregation
  3. Separation
  4. None of the given

428.Which one is not keyword in C++?

  1. operator
  2. const
  3. B_OP
  4. None of given

429.Template provides a convenient way to make a family of

  1. variables and data members
  2. functions and classes
  3. classes and exceptions
  4. programs and algorithms

430. Which one of the following terms must relate to polymorphism?

  1. Static allocation
  2. Static typing
  3. Dynamic binding
  4. Dynamic allocation

431. What is true about function templates?

  1. The compiler generates only one copy of the function template
  2. The compiler generates a copy of function respective to each type of data
  3. The compiler can only generate copy for the int type data
  4. None of the given

432. Which of the following is the best approach if it is required to have more than one functions having exactly same functionality and implement on different data types?

  1. Templates
  2. Overloading
  3. Data hiding
  4. Encapsulation

433. Assume a class Derv that is privately derived from class Base. An object of class Derv located in main () can access

  1. public members of Derv
  2. protected members of Derv
  3. private members of Derv
  4. protected members of Base

434. In order to define a class template, the first line of definition must be:

  1. template <type name T>
  2. type name <template T>
  3. Template Class <Class Name>
  4. Class <Template T>

435. When the base class and the derived class have a member function with the same name, you must be more specific which function you want to call (using _____).

  1. scope resolution operator
  2. dot operator
  3. null operator
  4. Operator overloading

 436.Which part of an object exhibits its state?

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

437.Inheritance is a way to?

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

438. Suppose you have been given the following design,

“A person has a name, age, address and sex. You are designing a class to represent a type of person called a patient. This kind of person may be given a diagnosis, have a spouse and may be alive”. Given that the person class has already been created, what of the following would be appropriate to include when you design the patient class?

  1. registration date and diagnosis         
  2. age and sex
  3. sex and diagnosis
  4. diagnosis and age

439.What problem (s may occur when we copy objects without using deep copy constructor?

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

440.these pointers are not accessible for static member functions?

  1. True    
  2. False

441.A static member function cannot be declared?

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

442.remain in memory even when all objects of a class have been destroyed?

  1. Static variables   
  2. Instance variable
  3. Primitive variables
  4. None of given

443.Friend functions are?                           

  1. functions of a class.
  2. None of given
  3. object member
  4. non-member 
  5. data member

444. Which means if A declares B as its friend, it does NOT mean that A can access private data of B. It only means that B can access all data of A?

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

445.The statement objA=objB; will cause a compiler error if the objects are of different classes?

  1. True
  2. False

446.Identify which of the following overloaded operator function’s declaration is appropriate for the given call?

  1. Rational_number_1 + 2.325
  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+ (double& obj;     
  5. Rational_number operator+ (Rational_number &obj, double& num;
  6. operator+ (double& obj;

447.Which operator cannot be overloaded?

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

448.To convert from a user-defined class to a basic type, you would most likely use?

  1. a built-in conversion operator.
  2. a one-argument constructor.
  3. an overloaded = operator.
  4. a conversion operator that’s a member of the class.

449.The technique in which we visualize our programming problems according to real life’s problems is Called?

  1. structured programming
  2. object oriented Programming          
  3. procedural programming
  4. none of the given

450.In object orientated programming, a class of objects can properties from another class of objects?

  1. Utilize
  2. Borrow
  3. Inherit         
  4. Adopt