1.Information hiding is?
- Encapsulation, Inheritance
- Encapsulation, Abstraction
- Encapsulation, Polymorphism
- Overloading
- The good model will be related to a real life problem?
- Closely
- Loosely
- Openly
- All
3.Which features of OOP will be used to derive a class from another?
- Inheritance
- Encapsulation
- Polymorphism
- Data hiding
4.Which is a weak relationship between two objects?
- Aggregation
- Inheritance
- Composition
- None of given
5.Data items in a class will be private?
- False
- True
- All
- none
6 .The class association?
- Simple Association
- Composition
- Aggregation
- 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?
- Simple association
- Aggregation
- Association
- 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?
- Constant pointer
- Constant pointer to class
- Constant pointer to constant object
- Constant pointer to object
11.Which way will be used to extract common behavior and attributes from the given classes and attribute
- Sub-typing
- Generalization
- Specialization
- Extension
- To derive a class from more than one class is called
- Single inheritance
- Multiple inheritance
- Encapsulation
- Polymorphism
13.If MY Class has a destructor what will be its named of destructor ?
- MyClass
- ~MY Class
- My Class
- MyClass~
14.Class XYZ….Is a valid class declaration?
- False
- True
- None
- all
15.Without using Deep copy constructor?
- System crash
- Memory Leakage
- Dangling pointer
16.If only one behavior of a derived class is incompatible with base class, then it is?
- Specialization
- Generalization
- Extension
- Inheritance
- The tangible things can be as an object?
- True
- False
18.Which will be different forms of a single entity exist?
- Aggregation
- Polymorphism
- Encapsulation
- Composition
19. Encapsulation purpose?
- Extending the behavior of a class in another class
- One entity takes all the attributes and operations of the other
- Data and behavior are tightly coupled within an object
- 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 ___
- Structure Programming
- Object Oriented Programming
- Procedural Programming
- Sequential Programming
- There will be no need of “is a” or “is a kind of” relationship in Generalization.
- True
- 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 __
- Encapsulation
- Protection
- Argumentation
- Abstraction
- The automatically…. Will be called when the object will created. Constructor
- all
- object
- None
25. It provides the facility to access the data member.
- private function
- Access function
- inline function
- None
- The concept of derived classes is ?
- inheritance
- encapsulation
- structure
- array
26. Which part of an object exhibits its state?
- Operations
- Data
- Any public part
- Any private part
- Inheritance will be for?
- organize data
- add features to existing classes without rewriting them
- pass arguments to objects of classes
- improve data-hiding and encapsulation
28. Which problem will occured when we will use copy objects without using deep copy constructor? All of given
- Dangling pointer
- Memory leakage
- none
- System crash
- This pointers will not accessible for static member functions?
- True
- False
- A static member function cannot be declared
- Virtual
- none
- Implicit
- Explicit
- It will remain in memory even when all objects of a class will be destroyed
- Instance variables
- Static variables
- Primitive variables
- None
- Friend functions are functions of a class
- non-member
- Object member
- data member
- None
- 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
- Friendship is one way only
- Friendship is two way only
- No friendship between classes
- Any kind of friendship
34. The statement object A=object B; will cause a compiler error if the objects are of different classes.
- False
- True
35. Which of the following overloaded operator function’s declaration is appropriate for the given call?
Rational_number_1+2.325
- Rational number operator+(double&obj);
- Where Rational_number_1 is an object of user defined class Rational_number.
- Rational-number operator+(Rational-number&obj);
- Rational_number operator+(Rational_number&obj, double&num);
- operator+(double&obj);
36. Which operator can not be overloaded?
- The relation operator (>=)
- Conditional operator(?:)
- Assignment operator (=)
- Script operator([])
37. Memory will be allocated to non static members ?
- Class is created
- Object is created
- Object is defined
- Object is initialized
- Consider the following code segment?
class test
{
int a;
int b;
int c;
public:
test();b(5).c(a).a(b){}}
- 5,5,5
- 5, Junk value, 5
- Junk value, 5, 5
- Junk value, 5, Junk value
- The static variable int type then it is automatically initialized with?
- 1
- 0
- Null
- None
40. In OOP, objects communicate with each other through?
- Messages
- Data members
- Voice chat
- Ports
- We can create array of objects through new operator?
- We can call overloaded constructor through new
- We can’t call overloaded constructor through new
- We can call default constructor through new
- None y
42 .When a base class can be replaced by the derived class then it is called
- sub-typing
- super-typing
- Generalization
- Specialization
43. Two methods can not be declared virtual?
- Private, Static
- Private, Public
- Static, Public
- None
44. Separation of implementation from interface provides ?
- Data Member
- Data Function
- Class
- None
- We can access a private static variable through?
- Static data member
- Static member function
- Global data member
- 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?
- Rational_number_1
- None
- 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
- to any function in the program
- only if you know the password
- to member functions of that class
- only to public members of the class
- A___ keyword tells the compiler to substitute the code within the function definition for every instance of a function call
- virtual
- inline
- instance
- None
- The >= operator can’t be overloaded.
- True y
- False