GATE-Programming Methodology

GATE-Programming Methodology
31. Which one of the following is pure virtual function?
  • Virtual void funct (int n)
  • virtual void funct () = 0
  • virtual funct (int n);
  • virtual void funct (int n) = 0
Show Answer
32. Virtual pointer is
  • data member
  • pointer to a base class
  • pointer to a derived class
  • none of these
Show Answer
33. Data members and member function of a class by default is respectively
  • private and public
  • public and private
  • both private
  • both public
Show Answer
34. Method overloading is
  • Overloading different member function of a class.
  • A feature in which multiple functions with same name and different signature
  • overloading without argument passing
  • none of these
Show Answer
35. In the binary overloaded operator function, second operand should be passed
  • explicitly
  • implicitly
  • passed by value
  • passed by reference
Show Answer
36. Overloading without explicit arguments to an operator function called
  • Binary operator overloading
  • Unary operator overloading
  • the class allowing access to another class
  • none of these
Show Answer
37. Friend function should be declared in the ..... part of the class.
  • public
  • private
  • both (a) and (b)
  • Anywhere
Show Answer
38. A friend function can be called
  • by using object of the class
  • directly
  • should not be called
  • like a normal function
Show Answer
39. A const member functions
  • doesn't change data fields of the object
  • can't be overloaded
  • don't have regurn type
  • have no arguments
Show Answer
40. Static member functions
  • can access only static members in the same class
  • has only one copy of it exists for all instances of a class
  • can access constant members
  • both (b) and (c)
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test