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

11. The public files in a class library usually contain

  • variable definition, constant definition
  • class declaration, variable definition
  • member function definition
  • constant definition, class declaration
Show Answer Report

12. Breaking a program into several files is desirable because

  • some files don't need to be recompiled each time
  • a program can be divided functionally
  • files can be marked in object form
  • all of these
Show Answer Report

13. Choose one most appropriate of the following.

  • the reference variables are bound to memory location at compile time only.
  • Reference variable bound to memoy location at link time only
  • Reference variable bound to memory location at load time only.
  • None of these
Show Answer Report

14. Runtime polymorphism can be achieved by

  • accessing virtual function through the pointer of base class
  • by accessing virtual function through the object
  • both (a) and (b)
  • none of these
Show Answer Report

15. Which one of the following is true statement ?

  • Friend function can access public data only
  • Scope of friend function is limited within the class where it is declared
  • A friend function can't be called using the object of that class
  • Like class member, it can acess the class members directly.
Show Answer Report

16. This pointer for any class internally declared as

  • int*this;
  • X*this
  • const X*this
  • X*const this;
Show Answer Report

17. In a single class function polymorphism happens on

  • Run time
  • Compile time
  • Both (a) and (b)
  • None of these
Show Answer Report

18. In a single class virtual polymorphism happen on

  • Run time
  • Compile time
  • Both (a) and (b)
  • None of these
Show Answer Report

19. The use of constructor is

  • to initilize the objects of its class
  • to allocate memory for the objects of its class
  • both (a) and (b)
  • none of these
Show Answer Report

20. Which one of the following is correct

  • Constructors return values
  • Constructors cont be overloaded.
  • Destructors do not have return values
  • There can be any number of constructors and destructors.
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test