Q.1.
In which access should a constructor be defined, so that object of the class can be created in any function?
Q.2.
Which among the following is correct for the class defined below? class student { int marks; public: student(){} student(int x) { marks=x; } }; main() { student s1(100); student s2(); student s3= return}
Q.3.
The copy constructors can be used to ________
Q.4.
Which constructor will be called from the object obj2 in the following C++ program? class A { int i; A() { i= } A(int x) { i=x+ } A(int y, int x) { i=x+y; } }; A obj1(10); A obj2(10,20); A obj3;
Q.5.
Which among the following represents correct constructor?
Q.6.
What happens when an object is passed by reference?
Q.7.
Which access specifier is usually used for data members of a class?
Q.8.
How to access data members of a class?
Q.9.
Which feature of OOP reduces the use of nested classes?
Q.10.
Which keyword among the following can be used to declare an array of objects in java?
Q.11.
Which operator can be used to free the memory allocated for an object in C++?
Q.12.
Which type of members can’t be accessed in derived classes of a base class?
Q.13.
Which among the following best describes the Inheritance?
Q.14.
Single level inheritance supports _____________ inheritance.
Q.15.
How to overcome diamond problem?
Q.16.
Which keyword is used to declare virtual functions?
Q.17.
What happens if non static members are used in static member function?
Q.18.
What is friend member functions in C++?
Q.19.
Where is the memory allocated for the objects?
Q.20.
Which of the following best describes member function overriding?