When we create an object of class using the malloc() function then the constructor gets called?

194. When we create an object of class using the malloc() function then the constructor gets called?

  1. True
  2. False

Answer: B) False

Explanation:

No, when we create an object of class using the malloc() function then the constructor will not call, the constructor gets called when we use the "new" operator for object creation.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.