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

1. Which of the following are good reasons to use an object oriented language ?

  • you can define you own data types
  • an object oriented program can be taught to correct its own erros
  • It is easier to conceptualize an object
  • both (a) and (c)
Show Answer Report

2. When a language has the capability to produce new data types, it is called

  • extensible
  • overloaded
  • encapsulated
  • reprehensible
Show Answer Report

3. Dividing a program into functions

  • is the key object oriented programming
  • Makes the program easier to conceptualize
  • makes the program run faster
  • both (b) and (c)
Show Answer Report

4. A variable defined within a block is visible

  • throughut the functions
  • from the point of definition onward in the block
  • from the point of definitional onward in the functionq
  • from the point of definition onward in the program
Show Answer Report

5. In object orient programming classes are useful because they

  • can closely model objects in the real word
  • bring together all aspects of an entity in one place
  • permit data to be hidden from other cloasses
  • all of these
Show Answer Report

6. Operator overloading is

  • making C++ opertors work with objects
  • giving, new meaning to existing C++ operators
  • making new C++ operators
  • both (a) and (b)
Show Answer Report

7. Assume a class C with obj1,obj2, and obj3. For the statement ofj3=1 - obj2 to work correctly, the overloaded operator must

  • return a value
  • create a named temporary object
  • use the object of which it is a member as an operand
  • both (a) and (c)
Show Answer Report

8. Inheritance is a way to

  • pass arguments and improve data hiding
  • pass arguments and add features to existing classes without rewriting them
  • make general classes into more specific classes and add features to existing classes without rewriting them
  • improve data hiding and encapsulation
Show Answer Report

9. In object oriented programming, advantages of inheritance incldude

  • providing a useful conceptual framework
  • avoiding rewriting of code
  • facilitating class libraries
  • all of these
Show Answer Report

10. Redirection redirects

  • a file from a device to a stream
  • a stream from a file to the screen
  • a device from the screen to a file
  • the screen from a device to a stream
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test