GATE-Programming Methodology Questions and Answers

Take Exam

Programming methodology in C++ focuses on structured and object-oriented approaches to problem-solving using efficient algorithms and modular coding. For GATE aspirants and placement candidates, programming questions and answers on this topic often involve analyzing code behavior, debugging, and implementing logic using OOP principles like inheritance, polymorphism, and encapsulation. This section provides GATE-oriented C++ programming methodology questions with answers, enabling learners to practice concepts such as recursion, data abstraction, and error handling. Practicing these C++ questions helps in mastering both academic and placement-level programming skills.

GATE-Programming Methodology

Showing 10 of 105 questions

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 Report

32. Virtual pointer is

  • data member
  • pointer to a base class
  • pointer to a derived class
  • none of these
Show Answer Report

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 Report

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 Report

35. In the binary overloaded operator function, second operand should be passed

  • explicitly
  • implicitly
  • passed by value
  • passed by reference
Show Answer Report

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 Report

37. Friend function should be declared in the ..... part of the class.

  • public
  • private
  • both (a) and (b)
  • Anywhere
Show Answer Report

38. A friend function can be called

  • by using object of the class
  • directly
  • should not be called
  • like a normal function
Show Answer Report

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 Report

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 Report
Questions and Answers for Competitive Exams Various Entrance Test