MCQ
Which special method is executed to perform initial task when an object is created in addition to allocating memory?
  • A
    main0
  • constructor
  • C
    a and b both
  • D
    Memory cart

Answer

Correct option: B.
constructor
constructor

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free