Which of the following provides a reuse mechanism?
1.Abstraction
2.Inheritance
3.Dynamic binding
4.Encapsulation
Which of the following statement is correct?
1.Class is an instance of object.
2. Object is an instance of a class.
3.Class is an instance of data type.
4.Object is an instance of data type.
How many types of polymorphisms are supported by C++?
1.1
2.2
3.3
4.4
In which of the following a virtual call is resolved at the time of compilation?
1.From inside the destructor.
2.From inside the constructor.
3.From inside the main().
4.Both A and B.
Which of the following concepts means waiting until runtime to determine which function to call?
1.Data hiding
2.Dynamic casting
3. Dynamic binding
4.Dynamic loading
Which of the following factors supports the statement that reusability is a desirable feature of a language?
1. It decreases the testing time.
2.It lowers the maintenance cost.
3.It reduces the compilation time.
4.Both A and B.
Which of the following is an abstract data type?
1.int
2.double
3.string
4.Class
Which of the following is an invalid visibility label while inheriting a class?
1.public
2.private
3.protected
4.friend
Which of the following is correct about the statements given below? All operators can be overloaded in C++. We can change the basic meaning of an operator in C++.
1.Only I is true.
2.Both I and II are false.
3.Only II is true.
4.Both I and II are true.
Which of the following is not a type of inheritance?
1.Multiple
2.Multilevel
3.Distributive
4.Hierarchical
Which of the following is the correct way of declaring a function as constant?
1. const int ShowData(void) { /* statements */ }
2. int const ShowData(void) { /* statements */ }
3. int ShowData(void) const { /* statements */ }
4. Both A and B
cout is a/an __________ .
1.operator
2.function
3.object
4.macro
How "Late binding" is implemented in C++?
1.Using C++ tables
2.Using Virtual tables
3.Using Indexed virtual tables
4.Using polymorphic tables
How many instances of an abstract class can be created?
1.1
2.5
3.13
4.0
Which of the following type of class allows only one object of it to be created?
1.Virtual class
2.Abstract class
3.Singleton class
4.Friend class
What happens if the base and derived class contains definition of a function with same prototype?
1. Compiler reports an error on compilation.
2.Only base class function will get called irrespective of object.
3.Only derived class function will get called irrespective of object.
4.Base class object will call base class function and derived class object will call derived class function.
What is correct about the static data member of a class?
1.A static member function can access only static data members of a class.
2.. A static data member is shared among all the object of the class.
3.A static data member can be accessed directly from main().
4.Both A and B.
Which inheritance type is used in the class given below? class A : public X, public Y {}
1. Multilevel inheritance
2.Multiple inheritance
3.Hybrid inheritance
4.Hierarchical Inheritance
Which of the following access specifier is used as a default in a class definition?
1.protected
2.public
3.private
4.friend
Which of the following approach is adapted by C++?
1.Top-down
2.Bottom-up
3.Right-left
4. Left-right
Which of the following are available only in the class hierarchy chain?
1. Public data members
2.Private data members
3.Protected data members
4.Member functions
Which of the following cannot be friend?
1.Function
2.Class
3.Object
4.Operator function
Which of the following cannot be used with the keyword virtual?
1.class
2. member functions
3.constructor
4.destructor
Which of the following concept of oops allows compiler to insert arguments in a function call if it is not specified?
1.Call by value
2.Call by reference
3.Default arguments
4.Call by pointer
Which of the following concepts is used to implement late binding?
1.Virtual function
2. Operator function
3.Const function
4. Static function
Which of the following concepts means adding new components to a program as it runs?
1. Data hiding
2.Dynamic typing
3.Dynamic binding
4.Dynamic loading
Which of the following concepts means determining at runtime what method to invoke?
1.Data hiding
2.Dynamic Typing
3.Dynamic binding
4.Dynamic loading
Which of the following concepts means wrapping up of data and functions together?
1.Abstraction
2.Encapsulation
3.Inheritance
4.Polymorphism
Which of the following concepts of OOPS means exposing only necessary information to client?
1.Encapsulation
2.Abstraction
3.Data hiding
4.Data binding
Which of the following concepts provides facility of using object of one class inside another class?
1.Encapsulation
2.Abstraction
3.Composition
4.Inheritance
Which of the following correctly describes overloading of functions?
1.Virtual polymorphism
2.Transient polymorphism
3.Ad-hoc polymorphism
4.Pseudo polymorphism
Which of the following functions are performed by a constructor?
1.Construct a new class
2.Construct a new object
3.Construct a new function
4.Initialize objects
Which of the following header file includes definition of cin and cout?
1.istream.h
2.ostream.h
3.iomanip.h
4.iostream.h
Which of the following is a mechanism of static polymorphism?
1.Operator overloading
2.Function overloading
3.Templates
4.All of the above
Which of the following is correct about class and structure?
1.class can have member functions while structure cannot.
2. class data members are public by default while that of structure are private.
3. Pointer to structure or classes cannot be declared.
4.class data members are private by default while that of structure are public by default.
Which of the following is correct about function overloading?
1.The types of arguments are different.
2.The order of argument is different.
3.The number of argument is same.
4. Both A and B.
Which of the following is not a type of constructor?
1.Copy constructor
2.Friend constructor
3.Default constructor
4. Parameterized constructor
Which of the following is not the member of class?
1.Static function
2.Friend function
3.Const function
4.Virtual function
Which of the following is the correct class of the object cout?
1.iostream
2.istream
3.ostream
4.ifstream
Which of the following is used to make an abstract class?
1.Declaring it abstract using static keyword.
2. Declaring it abstract using virtual keyword.
3.Making at least one member function as virtual function.
4.Making at least one member function as pure virtual function.
Which of the following keyword is used to overload an operator?
1.overload
2.operator
3.friend
4.override
Which of the following operator is overloaded for object cout?
1.>>
2.<<
3.+
4.=
Which of the following operators cannot be overloaded?
1.[]
2. ->
3.?:
4.*
Which of the following problem causes an exception?
1. Missing semicolon in statement in main().
2.A problem in calling function.
3.A syntax error.
4.A run-time error.
Which of the following statement is correct?
1.A constructor is called at the time of declaration of an object.
2.A constructor is called at the time of use of an object.
3.A constructor is called at the time of declaration of a class.
4. A constructor is called at the time of use of a class.
Which of the following statement is correct?
1.C++ allows static type checking.
2. C++ allows dynamic type checking.
3.C++ allows static member function be of type const.
4. Both A and B.
Which of the following statements is correct in C++?
1. Classes cannot have data as protected members.
2.Structures can have functions as members.
3.Class members are public by default.
4.Structure members are private by default.
Which of the following statements is correct?
1.Base class pointer cannot point to derived class.
2.Derived class pointer cannot point to base class.
3.Pointer to derived class cannot be created.
4. Pointer to base class cannot be created.
Which of the following statements regarding inline functions is correct
1.It speeds up execution
2.It slows down execution.
3.It increases the code size.
4.Both A and C.
Which of the following term is used for a function defined inside a class?
1. Member Variable
2.Member function
3.Class function
4.Classic function
Which of the following ways are legal to access a class data member using this pointer?
1.this->x
2.this.x
3.*this.x
4.*this-x
Which one of the following is correct about the statements given below? All function calls are resolved at compile-time in Procedure Oriented Programming. All function calls are resolved at compile-time in OOPS.
1.Only II is correct.
2.Both I and II are correct.
3.Only I is correct.
4.Both I and II are incorrect
Which one of the following is the correct way to declare a pure virtual function?
1.virtual void Display(void){0};
2.virtual void Display = 0;
3.virtual void Display(void) = 0;
4. void Display(void) = 0;
Which one of the following options is correct about the statement given below? The compiler checks the type of reference in the object and not the type of object.
1.Inheritance
2.Polymorphism
3.Abstraction
4.Encapsulation
Which one of the following options is correct?
1.Friend function can access public data members of the class.
2.Friend function can access protected data members of the class.
3. Friend function can access private data members of the class.
4.All of the above.
Why reference is not same as a pointer?
1.A reference can never be null.
2.A reference once established cannot be changed.
3.Reference doesn,t need an explicit dereferencing mechanism.
4.All of the above.