Home »
MCQs »
C++ MCQs
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?
- Linker error
- Compilation error
- Logical error
- None of the above
Answer: B) Compilation error
Explanation:
It will generate a compilation error.