Question

What is the primary purpose of a "constructor" in object-oriented programming?

A To automatically initialize an object's data members when it is created
B To destroy an object when it goes out of scope
C To convert one data type into another
D To define abstract methods without implementation
E To manage memory deallocation of an object
Practice Next

Hey! Ask a query

🎓
Think You're Ready for RBI Grade B?
RBI Grade B 2026 Phase 1 Memory Based Paper
  • 200 Questions with Detailed Solutions
  • Section-wise Coverage (GA, English, Quant & Reasoning)