What will happen, when we create a class with a parameterized constructor and without having a zero-argument constructor, then we create an object of the class that needs a zero argument constructor?

193. What will happen, when we create a class with a parameterized constructor and without having a zero-argument constructor, then we create an object of the class that needs a zero argument constructor?

  1. Linker error
  2. Compilation error
  3. Logical error
  4. None of the above

Answer: B) Compilation error

Explanation:

It will generate a compilation error.

Comments and Discussions!

Load comments ↻






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