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
41. Static data members
- should be initialized like global variables.
- has only one copy of it exists for all instances of a class
- should be initialized like extern variables.
- both (a) and (b)
42. Which of the following statements are true. I. Constructors can be virtual. II. Destructors can't be virtual
- Both the are true.
- Both are false
- I is true and II is false
- II is true and I is false
43. Choose the correct statement I. Non-const object can't call constant member II. Constant objects can't call non-const member function III. A constant object can change non constant member function. IV. A constant object can't change non-constant member function. of these statement
- Both I and IV
- Both II and III
- All are correct
- All are wrong
44. Dynamic destruction is
- destruction of created objects.
- the deallocation of memory when the object goes out of scope
- simply memory deallocation.
- run-time memory deallocation.
45. Nested class is
- A class declared inside another class declared
- a derived class
- Abstract class
- None of these
46. Static class member's definitions and intializations occurs
- inside the class
- inside the objects of the class
- outside the class and function bodies
- anywhere
47. function overloading done at
- Run-time
- Compile-time
- Linnking time
- None of these
48. Protected members are accessible to
- members of its own class only
- to the members of deprived class
- Both (a) and (b)
- are not accessible outside the class.
49. A derived class
- inherits data members and member functions from base class.
- inheris constructors and destructors.
- object can access protected members with the dot operator.
- both (a) and (b)
50. The data type created by the data abstraction process is called
- class
- structure
- Abstract data type
- User-defined data type