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)
Show Answer
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
Show Answer
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
Show Answer
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.
Show Answer
45. Nested class is
  • A class declared inside another class declared
  • a derived class
  • Abstract class
  • None of these
Show Answer
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
Show Answer
47. function overloading done at
  • Run-time
  • Compile-time
  • Linnking time
  • None of these
Show Answer
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.
Show Answer
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)
Show Answer
50. The data type created by the data abstraction process is called
  • class
  • structure
  • Abstract data type
  • User-defined data type
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test