Q. Which of the following is the correct way to define a constructor with parameters in C++?
β
Correct Answer: (A)
MyClass(int x, int y) { }
Explanation: The correct way to define a constructor with parameters is 'MyClass(int x, int y) { }'.