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

Print/Downlaod pdf

551. If a class declared dynamic memory allocation, then:

  1. Default copy constructor, shallow copy is implemented
  2. User defined copy constructor, shallow copy is implemented
  3. Default copy constructor, deep copy is implemented
  4. User defined copy constructor, deep copy is implemented

552. Information hiding can be get?

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

553.  The actual actions are coded is called:

  1. Function declaration
  2. Function calling
  3. Function definition
  4. None

554. Which of the following will happen when a constant function tries to change the value of data members of the class?

  1. Compiler will allow changing data members
  2. Program will be executed successfully
  3. Compile time error will occur
  4. Run time error will occur      
  5.   

555. Which way of OOP is used to derive a class from another?

  1. Encapsulation
  2. Polymorphism
  3. Data hiding
  4. Inheritance    


556. Suppose there is an object of type Teacher, which of the following can be considered as one of its attributes?

  1. Name
  2. Eat
  3. Work
  4. Sleep

557.  To derive a class from more than one classes is called?

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

558. Without Deep copy constructor the problem can occur.

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

559. Aggregation is implemented using pointer.

  1. True
  2. False

560. Which of the following is directly related to polymorphism?

  1. Overriding
  2. Constant members
  3. Static members
  4. None

561. Which of the following is the way to extract common behavior and attributes from the given classes and make a separate class of those common behaviors and attributes?

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

562. We can allocate dynamic memory allocation through key word?

  1. Static
  2. Global
  3. New
  4. Constant

563. Which is an 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 given

564. Three main merits of “Object Oriented Programming” are

  1. Encapsulation, inheritance, polymorphism
  2. polymorphism, overloading, overriding
  3. encapsulation, inheritance, dynamic binding
  4. None

565. The sender of a message does not need to know exact class of the receiver.

  1. Inheritance
  2. Encapsulation
  3. Overloading
  4. None

566. Which will not a major element in an object model?

  1. Abstraction
  2. Encapsulation
  3. Persistence
  4. Hierarchy

567. Member functions defined inside a class declaration are by default?

  1. Visible
  2. Public
  3. Private
  4. Protected

568. Consider the following class:

class X

{

int a, b, c;

public:

X (): b(10), c(0),a(7){}};

Choose the correct order of initialization of above data members.

  1. a, c, b
  2. b, a, c
  3. a, b, c
  4. c, a, b

569. If a class Parent inherits from class Children, then class Parent is called?

  1. Child class
  2. Base class
  3. Parent class
  4. Super class

570. We can create array of objects with a user defined constructor?

  1. True
  2. False   

571. A class has destructor?

  1. No
  2. One
  3. Two
  4. Three

572. It is creating objects of one class inside another class?

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

573. Constant data members can be initialized?

  1. Constant Member Function
  2. Non-constant Member Function
  3. Member initializer List
  4. Class

574. The sub-object’s life is not dependent on the life of master class in ___

  1. Composition
  2. Aggregation
  3. Separation
  4. None

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

  1. Member functions
  2. Access specifier
  3. Data members
  4. None

576. The dot operator connects the following two entities?

  1. A class member and a class object
  2. A class object and a class
  3. A class and a member of that class
  4. A class object and a member of that class

577. In OOP, disadvantage of inheritance include?

  1. It provides a useful conceptual framework
  2. It avoids rewriting a certain piece of code
  3. It facilitates the class libraries
  4. It provides independence of classes

578. An abstract class shows behavior?

  1. Overriding
  2. Specific
  3. General
  4. Overloading

579. The objects exhibit identical characteristics, then they belong to?

  1. Different classes
  2. Multiple classes
  3. Same class
  4. Abstract lass

580. Through interface we access object’s ___

  1. States
  2. Data members
  3. Behavior
  4. Class

581. Object can be declared constant with the use of Constant keyword.

  1. True
  2. False

582. Our model, and the rest of model is not affected, then it is called?

  1. Consistency
  2. Flexibility
  3. Efficiency
  4. Reusability

583. A template function must have at least generic data type?

  1. Zero
  2. Two
  3. Three
  4. none

584.Which of the following statement is best regarding declaration of friend function?

  1. Friend function must be declared after public keyword
  2. Friend function must be declared after private keyword.
  3. Friend function must be declared at the top within class definition.
  4. It can be declared anywhere in class as these are not affected by the public and private keywords

585.Which one of the following is the declaration of overloaded pre-increment operator implemented as member function?

  1. Class-name operator +(;
  2. Class-name operator +(int ;
  3. Class-name operator ++(;     
  4. Class-name operator +(int ;

586.Class is a user defined?                   

  1. data type
  2. memory referee
  3. value
  4. none of the given options.

587.How many bytes will the pointer integer of type int move in the following statement?

 Integer pointer += 3;

  1. 3 bytes
  2. 6 bytes
  3. 12 bytes
  4. 24 bytes

588.Which of the following is the correct C++ syntax to allocate space dynamically for an array int?

  1. new int(10 ;
  2. new int[10] ;
  3. int new(10 ;
  4. int new[10];

589.A Pointer is a special variable that contain?

  1. Data values
  2. Memory Address
  3. Both data and values
  4. None of the given option

590.Reference Value Type Data The code is written to the program?

  1. implement
  2. design
  3. analysis
  4. none of the given options

591.Operator overloading can be?                                  

  1. Classes
  2. Function
  3. Operators
  4. Reference

592.When a value is referred by a normal variable then it is known as?

  1. Direct Reference
  2. Indirect Reference
  3. Partial Reference
  4. Proper Reference

When a value is referred by a normal variable is known as direct reference

593.Which of the following function is used to increase the size of already allocated memory chunk?

  1. malloc
  2. c allocation
  3. reallocation
  4. free

594.Which is NOT a preprocessor directive?

  1. #Error
  2. #Define
  3. #Line
  4. #Indefine

595.The stream objects are included in which header file?

  1. Iostream’s
  2. stream’s
  3. Istream.h
  4. ostream.h

596.Overloaded delete operator function takes the same parameter as an argument returned by new?

  1. operator
  2. function.
  3. True
  4. False.

597.When an array of object is created dynamically then there is no way to provide parameterized constructors?

  1. array of objects.
  2. True  
  3. False   

598.C is widely known as development language of OS?

  1. Linux
  2. Windows
  3. Unix12
  4. Mac OS

599.Computer can understand only machine language code.

  1. True
  2. False

600.We cannot define a function as a friend of a Template class

  1. True
  2. False