501.Which is a weak relationship between two objects?
- Aggregation
- Inheritance
- Composition
- None of given
502.Data items in a class will be private?
- False
- True
- All
- none
503 The class association?
- Simple Association
- Composition
- Aggregation
- Inheritance
504. 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 ()
505.Which is not an object association?
- Simple association
- Aggregation
- Association
- Inheritance
506. We can achieve encapsulation
- Least interdependencies among modules
- Implementation independence
- Information hiding
- All of given options
507.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
508.Which way will be used to extract common behavior and attributes from the given classes and attribute
- Sub-typing
- Generalization
- Specialization
- Extension
509. To derive a class from more than one class is called
- Single inheritance
- Multiple inheritance
- Encapsulation
- Polymorphism
510.If MY Class has a destructor what will be its named of destructor?
- My Class
- ~MY Class
- My Class
- My Class~
511.Class XYZ…. Is a valid class declaration?
- False
- True
- None
- all
512.Without using Deep copy constructor?
- System crash
- Memory Leakage
- Dangling pointer
- all
513.If only one behavior of a derived class is incompatible with base class, then it is?
- Specialization
- Generalization
- Extension
- Inheritance
514. The tangible things can be as an object?
- True
- False
515.Which will be different forms of a single entity exist?
- Aggregation
- Polymorphism
- Encapsulation
- Composition
516. 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
517. How can visualize our programming problems according to real life’s problems is called ___
- Structure Programming
- Object Oriented Programming
- Procedural Programming
- Sequential Programming
518. There will be no need of “is a” or “is a kind of” relationship in Generalization.
- True
- False
519. The behavior of a derived class I will be incompatible with base class?
- none
- Extension
- Specialization
- Encapsulation
520. What will be hiding of unwanted details from users is called __
- Encapsulation
- Protection
- Argumentation
- Abstraction
521. The automatically…. Will be called when the object will be created.
- all
- object
- None
522. It provides the facility to access the data member.
- private function
- Access function
- inline function
- None
523. The concept of derived classes is?
- inheritance
- encapsulation
- structure
- array
524. Which part of an object exhibits its state?
- Operations
- Data
- Any public part
- Any private part
525. 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
526. Which problem will be occurred when we will use copy objects without using deep copy constructor?
- Dangling pointer
- Memory leakage
- All of given
- System crash
527. This pointer will not accessible for static member functions?
- True
- False
528. A static member function cannot be declared
- Virtual
- none
- Implicit
- Explicit
529.It will remain in memory even when all objects of a class will be destroyed
- Instance variables
- Static variables
- Primitive variables
- None
530. Friend functions are functions of a class
- non-member
- Object member
- data member
- 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
- Friendship is one way only
- Friendship is two waye only
- No friendship between classes
- Any kind of friendship
532. The statement object A=object B; will cause a compiler error if the objects are of different classes.
- False
- True
533. 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);
534. Which operator cannot be overloaded?
- The relation operator (>=)
- Conditional operator (?)
- Assignment operator (=)
- Script operator ([])
535. Memory will be allocated to none static members?
- Class is created
- Object is created
- Object is defined
- Object is initialized
536. 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
537.The static variable int type then it is automatically initialized with?
- 1
- 0
- Null
- None
538. In OOP, objects communicate with each other through?
- Messages
- Data members
- Voice chat
- Ports
539. 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
540when a base class can be replaced by the derived class then it is called
- sub-typing
- super-typing
- Generalization
- Specialization
541. Two methods cannot be declared virtual?
- Private, Static
- Private, Public
- Static, Public
- None
542. Separation of implementation from interface provides?
- Data Member
- Data Function
- Class
- None
543. We can access a private static variable through?
- Static data member
- Static member function
- Global data member
- 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?
- Rational_number_1
- None
- Both Rational_number_1 & Rational_number_2
- any of the two objects, randomly
545. Static member cannot be called with the class name?
- True
- False
546. 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
547. A___ keyword tells the compiler to substitute the code within the function definition for every instance of a function call
- virtual
- inline
- instance
- None
548. The >= operator can’t be overloaded.
- True
- False
549. The merits of inheritance is:
- Better understanding
- Less understanding
- Reuse
- Less complexity
550. An instance of user defined type?
- Object
- Class
- Variable
- Program