Multiple choice technology programming languages

What would be the output of the following: class A { A() const; //... };

  1. Compile-Time Error

  2. Run time error

  3. Default construtor is called

  4. none of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In C++, constructors cannot be declared with the const cv-qualifier. Attempting to declare a constructor as const results in a compile-time error because constructors are meant to initialize and modify non-const objects.