Question.6
A developer defines a parameterized constructor and then tries to create an object without arguments:
class Config { int timeout; public: Config(int t) : timeout(t) {} }; Config c; // No arguments
Will this compile?
Select Answer
Yes -- the compiler provides a default constructor
No -- defining any constructor causes the compiler to remove the implicit default constructor; Config() does not exist
Yes -- timeout defaults to 0
No -- constructors are only required for global objects