Object Oriented Programing

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

1. b) Default constructors 26.

d) 5
27. d) Using dot,
2. c) Protected 15. d) Static data arrow or using
members are scope resolution
3. c) Default defined outside operator with
members can’t class, not in class name
be inherited constructor 28. b) Member
16. a) The structure functions whose
4. b) Public must have been definition is
defined before expanded in
5. d) Private, class. place of its call
protected and
public members 17. d) As many as 29. a) Compile time
of class A required error
6. b) All private 18. c) Dot or arrow
constructors as required 30. c) Doesn’t
contain “this”
7. a) All the data 19. a) Return the pointer
members are address of the
added private data 31. d) Used directly
member using a or with this
8. c) No, because member function pointer
friend function 32. c) Must be non-
can only access 20. d) Considered a static member
private members red flag, and not and should not
of friend class recommended be friend of class
9.  a) No class will for large scale
be able to use 33. a) It should not
implement 21. a) Static data contain any body
members of members and defined by
abstract class. subclasses
10. d) Public 22. b) const
11. a) Private 34. b) Automatically
23. b) Protected generic
12. d) Public
13. a) Data members 24. c) abstract a; 35. a) Access all the
members of the
14. b) Can be 25. b) Functions class
initialized only belonging a class
with help of
36. a) Call other 51. c) Helps to add
member extra
functions functionality to a
function
37. d) Constructor
and destructor
38. c) Access public
members of
subclass

39. b) Classes
declared inside a
function

40. c) Defined inside


the class body

41. d) No, it can’t


access In anyway
42. a) Static and
extern

43. d) No, not


possible anyway
44. c) Abstract

45. d) SAP ABAP


46. d) As many as
required
47. b) Defined in
constructor

48. a) Yes, since local

49. b) Within the


function

50. d) No, can’t


access

You might also like