GATE-Programming Methodology Questions and Answers

Practice Mode
Showing 10 of 105 questions
Q21
Objects with arbitrary life times are created in
  • A heap memory
  • B main memory
  • C stock memory
  • D registers
Answer: Option A
Q22
Consider the following statements: I. For each object different copy of static data members, available like normal data members. II. Static data members must be defined and initialized like global variables, otherwise linking error will result. of these statement
  • A both I and II are true
  • B both I and II are false
  • C I is true and II is false
  • D II is true and I is false
Answer: Option D
Q23
What exception will a function throw it an exception specification of the form throw () ?
  • A Of any type
  • B Class type
  • C Both (a) and (b) above
  • D function will not throw an exception
Answer: Option C
Q24
If a catch clause {catch (...)} used with other catch clase, it should be placed I. In the beginning of list of exception handlers II. Two level directory III. Tree structured directory IV. Any where
  • A Only I is correct
  • B Both II and III are correct
  • C Both I and III are correct
  • D Only II is correct
Answer: Option D
Q25
When subscript operator is overloaded, then it can parameter of type
  • A Integer
  • B Character
  • C Any data type
  • D String
Answer: Option D
Q26
template classes that have already been written to perform common class tasks are called
  • A container classes
  • B receptacle classes
  • C repository classes
  • D alembic classes.
Answer: Option A
Q27
A pro9gramming structure that contains data and a pointer to the next object is a
  • A template
  • B class
  • C pointer class
  • D linked list
Answer: Option D
Q28
Visibility mode by default is
  • A public
  • B private
  • C protected
  • D anywhere
Answer: Option D
Q29
Virtual function should be defined in ........ section of a class.
  • A private
  • B public
  • C protected
  • D anywhere
Answer: Option D
Q30
Of the following, correct statements is
  • A Only class member function qualify for virtual functions
  • B A base class pointer may address an object of its class or an object of any class deprived from the base class.
  • C Virtual functions have to be accessed through the a pointer to the base class only
  • D Friend function qualify for virtual function
Answer: Option C
Questions and Answers for Competitive Exams Various Entrance Test