Print/Downlaod pdf

1.Information hiding is?

  1. Encapsulation, Inheritance
    1. Encapsulation, Abstraction
    1. Encapsulation, Polymorphism
    1. Overloading
  2. The good model will be related to a real life problem?
    1. Closely
    1. Loosely
    1. Openly
    1. All

3.Which features of OOP will be used to derive a class from another?

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

4.Which is a weak relationship between two objects?

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

5.Data items in a class will be private?

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

6 .The class association?

  1. Simple Association
    1. Composition
    1. Aggregation
    1. Inheritance
  • If there will be an object of type Person, which of the following will be considered as one of its attributes
    • Both Name and Age
    • Name
    • Age
    • Work()

8.Which is not an object association?

  1. Simple association
    1. Aggregation
    1. Association
    1. Inheritance
  • We can achieve encapsulation
    • Least interdependencies among modules
    • Implementation independence
    • Information hiding
    • All of given options

10.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

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

  1. Sub-typing
    1. Generalization
    1. Specialization
    1. Extension
  2. To derive a class from more than one class is called
    1. Single inheritance
    1. Multiple inheritance
    1. Encapsulation
    1. Polymorphism

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

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

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

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

15.Without using Deep copy constructor?

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

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

  1. Specialization
    1. Generalization
    1. Extension
    1. Inheritance
  1. The tangible things can be as an object?
    1. True
    1. False

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

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

19. 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

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

  1. Structure Programming
    1. Object Oriented Programming
    1. Procedural Programming
    1. Sequential Programming
  2. There will be no need of “is a” or “is a kind of” relationship in Generalization.
    1. True
    1. False
  • The behavior of a derived class I will be incompatible with base class?
    • none
    • Extension
    • Specialization
    • Encapsulation

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

  1. Encapsulation
    1. Protection
    1. Argumentation
    1. Abstraction
  2. The automatically…. Will be called when the object will created. Constructor
    1. all
    1. object
    1. None

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

  1. private function
    1. Access function
    1. inline function
    1. None
  2. The concept of derived classes is ?
    1. inheritance
    1. encapsulation
    1. structure
    1. array

26. Which part of an object exhibits its state?

  1. Operations
    1. Data
    1. Any public part
    1. Any private part
  2. Inheritance will be for?
    1. organize data
    1. add features to existing classes without rewriting them
    1. pass arguments to objects of classes
    1. improve data-hiding and encapsulation

28. Which problem will occured when we will use copy objects without using deep copy constructor? All of given

  1. Dangling pointer
    1. Memory leakage
    1. none
    1. System crash
  2. This pointers will not accessible for static member functions?
    1. True
    1. False
  3. A static member function cannot be declared
    1. Virtual
    1. none
    1. Implicit
    1. Explicit
  4. It will remain in memory even when all objects of a class will be destroyed
  1. Instance variables
    1. Static variables
    1. Primitive variables
    1. None
  2. Friend functions are functions of a class
    1. non-member
    1. Object member
    1. data member
    1. None
  3. 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
    1. Friendship is two way only
    1. No friendship between classes
    1. Any kind of friendship

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

  1. False
  2. True

35. 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);

36. Which operator can not be overloaded?

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

37. Memory will be allocated to non static members ?

  1. Class is created
    1. Object is created
    1. Object is defined
    1. Object is initialized
  2. 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
    1. 5, Junk value, 5
    1. Junk value, 5, 5
    1. Junk value, 5, Junk value
  2. The static variable int type then it is automatically initialized with?
    1. 1
    1. 0
    1. Null
    1. None

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

  1. Messages
    1. Data members
    1. Voice chat
    1. Ports
  2. We can create array of objects through new operator?
    1. We can call overloaded constructor through new
    1. We can’t call overloaded constructor through new
    1. We can call default constructor through new
    1. None y

42 .When a base class can be replaced by the derived class then it is called

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

43. Two methods can not be declared virtual?

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

44. Separation of implementation from interface provides ?

  1. Data Member
    1. Data Function
    1. Class
    1. None
  2. We can access a private static variable through?
    1. Static data member
    1. Static member function
    1. Global data member
    1. None

46. 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
  • any of the two objects, randomly
  • Static member can not be called with the class name?
  • True
  • False

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

  1. to any function in the program
    1. only if you know the password
    1. to member functions of that class
    1. only to public members of the class
  2. A___ keyword tells the compiler to substitute the code within the function definition for every instance of a function call
    1. virtual
    1. inline
    1. instance
    1. None
  3. The >= operator can’t be overloaded.
    1. True y
    1. False