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

71. Creating a class definition when one class is granting friendship to a function that is a member of another class requires first

  • a forward declaration of the class that holds the member function being granted friendship
  • a forward declaration of the class that is granging friendship
  • the definition of the class that contains the function that will be friend
  • the definition of the class that
Show Answer Report

72. If my Class is a friend of Your-Class, which is true ?

  • Your Class is a friend of My Class
  • Your Class is not a friend of My Class
  • Yur class may or may not be a friend of My Class
  • Your Class cannot be a friend of My Class
Show Answer Report

73. Forcing a variable type to become another type before accessing an appropriate function is known as

  • regression
  • recursion
  • conversion
  • coersion
Show Answer Report

74. Without overloading of the + operator,

  • additional could not be performed on built-in types
  • addition could not be performed on class objects
  • class objects could not be added to one another
  • programs would be harder to read and understand.
Show Answer Report

75. Which of the following operators may be overloaded ?

  • .(member)
  • ::(scope resolution)
  • %(modulus)
  • ?:(conditional)
Show Answer Report

76. Which of the following may be overloaded as an operator?

  • operator*()
  • *operator()
  • op*()
  • *op()
Show Answer Report

77. The names of the operator function that overloads the * symbol is

  • operator*()
  • *operator()
  • op*()
  • *op()
Show Answer Report

78. Assuming you have properly overloaded the/operator for a Number class, and that a and b are two members of the Number class, which expression is legal?

  • a/b
  • a.operator/(b)
  • both(a) and (b)
  • none of these
Show Answer Report

79. Assuming yu have properly overloaded the *operator to perform multiplication for a Number class, and that a, b, and c are three members of the Number class, which expression is legal?

  • a*b
  • a*b*c
  • both (a) and (b)
  • none of these
Show Answer Report

80. When an operator is used alone with a single variable argument, the operator is said to be

  • unique
  • unary
  • alone
  • allocated
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test