1. When a member function of a class call another member function, it is
a) Nesting of classes
b) Nesting of functions
c) Nesting of objects
d) None of the above

2. A function defined inside a class is called
a) A class function
b) A friend function
c) A member function
d) None of the above

3. Information is made shareable through
a) inheritance
b) data encapsulation
c) data abstraction
d) none of the above

4. Functions can returns
a) arrays
b) reference
c) object
d) all of the above

5. The memory for date members is allocated
a) When a class is defined
b) When an object is initialized
c) When an object is created
d) None of the above

6. The memory for member functions is allocated
a) When a class is defined
b) When a object is created
c) When an object is initialized
d) None of the above

7. The dot operator relates
a) A class member and a class object
b) A class object and a class
c) A class and a member of that class
d) A class object and member of that class

8. A class having another class definition is
a) Nested class
b) Subordinate class
c) Enclosing class
d) None of the above

9. A class whose member functions are friends of other class is
a) Friend class
b) Abstract class
c) Virtual class
d) None of the above

10. The data members of a class are initialized
a) in class definition
b) by a non-member function
c) through constructor function when a class object is created
d) none of the above

11. A constructor function is
a) A friend function to a class
b) A member function with the same name as its class
c) A non-member function
d) None of the above

12. An enumerated type is composed of
a) Integer values with user defined name
b) Variables of different data types
c) Constant numeric values
d) None of the above

13. In C++, the arguments by default are passed by
a) call be reference
b) call be value
c) both (a) & (b)
d) none of the above

14. ? is an example of
a) unary operator
b) binary operator
c) ternary operator
d) none of the above

15. new operator is used
a) to define a new variable
b) to create a new data type
c) to allocate memory dynamically
d) none of the above

16. A constructor function is generally defined
a) In the public section of a class
b) In the private section of a class
c) In the protected section of a class
d) None of the above

17. A class having no public constructors is
a) A private class
b) A public class
c) An abstract class
d) None of the above

18. If a constructor function is defined in private section of a class, then
a) The object cannot be created
b) Only member functions and friends may declare objects of the class
c) Both (a) & (b)
d) None of the above

19. A constructor with no argument is
a) Default constructor
b) Parameterized constructor
c) Copy constructor
d) None of the above

20. If default arguments are provided to a constructor function, then it becomes
a) Default constructor
b) Copy instructor
c) Parameterized constructor
d) None of the above

21. The class of which the objects are not instantiated is
a) Abstract class
b) Virtual class
c) Static class
d) None of the above

22. && denotes
a) logical OR
b) logical AND
c) Bitwise AND
d) None of the above

23. The parameterized constructor
a) Needs initial values as arguments during creation of an object
b) Can be invoked explicitly only
c) Can be invoked implicitly only
d) None of the above

24. Explicit call to a constructor means
a) Providing the constructor name explicitly to invoke it
b) Not providing the construction name at all
c) Is the shorthand method
d) None of the above

25. Classes in C++ are
a) Fundamental data type
b) Primitive data type
c) Desired data type
d) None of the above
Mukesh Rajput

Mukesh Rajput

I am a Computer Engineer, a small amount of the programming tips as it’s my hobby, I love to travel and meet people so little about travel, a fashion lover and love to eat food, I am investing a good time to keep the body fit so little about fitness also..

Post A Comment:

0 comments: