Which of the following type of constructors (in C++) does NOT accept parameters?
2022
Which of the following type of constructors (in C++) does NOT accept parameters?
Answer: A. Default constructor — A default constructor in C++ is defined as a constructor that can be called without any arguments. While parameterized constructors require specific input…
- A.
Default constructor
- B.
Dynamic constructor
- C.
Parameterised constructor
- D.
Copy constructor
Attempted by 592 students.
Show answer & explanation
Correct answer: A
A default constructor in C++ is defined as a constructor that can be called without any arguments. While parameterized constructors require specific input values and copy constructors take an object reference, the default constructor initializes objects without external parameters.
Loading lesson…