GATE-Programming Methodology Questions and Answers
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
21. Objects with arbitrary life times are created in
- heap memory
- main memory
- stock memory
- registers
22. Consider the following statements: I. For each object different copy of static data members, available like normal data members. II. Static data members must be defined and initialized like global variables, otherwise linking error will result. of these statement
- both I and II are true
- both I and II are false
- I is true and II is false
- II is true and I is false
23. What exception will a function throw it an exception specification of the form throw () ?
- Of any type
- Class type
- Both (a) and (b) above
- function will not throw an exception
24. If a catch clause {catch (...)} used with other catch clase, it should be placed I. In the beginning of list of exception handlers II. Two level directory III. Tree structured directory IV. Any where
- Only I is correct
- Both II and III are correct
- Both I and III are correct
- Only II is correct
25. When subscript operator is overloaded, then it can parameter of type
- Integer
- Character
- Any data type
- String
26. template classes that have already been written to perform common class tasks are called
- container classes
- receptacle classes
- repository classes
- alembic classes.
27. A pro9gramming structure that contains data and a pointer to the next object is a
- template
- class
- pointer class
- linked list
29. Virtual function should be defined in ........ section of a class.
- private
- public
- protected
- anywhere
30. Of the following, correct statements is
- Only class member function qualify for virtual functions
- A base class pointer may address an object of its class or an object of any class deprived from the base class.
- Virtual functions have to be accessed through the a pointer to the base class only
- Friend function qualify for virtual function