1.

Destructor calls ________________ (C++)(a) Are only implicit(b) Are only explicit(c) Can be implicit or explicit(d) Are made at end of program onlyThis question was posed to me by my college director while I was bunking the class.My doubt stems from Execution of Constructor or Destructor in section Constructors and Destructors of Object Oriented Programming

Answer»

Right option is (c) Can be implicit or explicit

Easy explanation - The destructors are usually called implicitly whenever an object GOES out of SCOPE. The destructors can also be called explicitly if REQUIRED. The CALL must be MADE, implicitly or explicitly.



Discussion

No Comment Found

Related InterviewSolutions