GATE-Programming Methodology
GATE-Programming Methodology
41. Static data members
- should be initialized like global variables.
- has only one copy of it exists for all instances of a class
- should be initialized like extern variables.
- both (a) and (b)
42. Which of the following statements are true.
I. Constructors can be virtual.
II. Destructors can't be virtual
- Both the are true.
- Both are false
- I is true and II is false
- II is true and I is false
43. Choose the correct statement
I. Non-const object can't call constant member
II. Constant objects can't call non-const member function
III. A constant object can change non constant member function.
IV. A constant object can't change non-constant member function.
of these statement
- Both I and IV
- Both II and III
- All are correct
- All are wrong
44. Dynamic destruction is
- destruction of created objects.
- the deallocation of memory when the object goes out of scope
- simply memory deallocation.
- run-time memory deallocation.
45. Nested class is
- A class declared inside another class declared
- a derived class
- Abstract class
- None of these
46. Static class member's definitions and intializations occurs
- inside the class
- inside the objects of the class
- outside the class and function bodies
- anywhere
48. Protected members are accessible to
- members of its own class only
- to the members of deprived class
- Both (a) and (b)
- are not accessible outside the class.
49. A derived class
- inherits data members and member functions from base class.
- inheris constructors and destructors.
- object can access protected members with the dot operator.
- both (a) and (b)
50. The data type created by the data abstraction process is called
- class
- structure
- Abstract data type
- User-defined data type