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

101. If the subscript operator has been correctly overloaded for a Number class to accept an integer value, and num is a member of the number class, which of the following statements is correct ?

  • [num]rr;
  • num[[44]'
  • num=[[44];
  • num 44;
Show Answer Report

102. Which of the following statements is true ?

  • The subscript operator may take only one argument
  • The parentheses operator may take only one argument
  • The subscript operator may take
  • None of these
Show Answer Report

103. The >> operator

  • may be overloaded for input
  • must be overloaded if there will be input to classes
  • must be overloaded if the << operator is overloaded.
  • may be overloaded for input, but not for shifting bits
Show Answer Report

104. When the >> operator is overloaded for input, one parameter that should be passed to the functions is a

  • reference to istream
  • referece to ostram
  • copy of istream
  • copy of ostream
Show Answer Report

105. To overload a post fix ++ fir a Number class, an appropriate function header is

  • Number & Number :: operator ++(Number & num)
  • number & Number:: operator ++9int)
  • Number & Number :: operator ++()
  • Number:: operator ++ (Number & num).
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test