Mia's C++ program has a function that's called before entering the main function. Which feature of C++ allows for such behavior?

  • Constructors
  • Destructors
  • Function Overloading
  • Inheritance
In C++, constructors are special member functions that are called automatically when an object of a class is created. If Mia's program has a function called before entering the main function, it's likely a constructor for an object instantiated before main.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *