Q. Which of the following is the correct way to define a function outside a class in C++?
β
Correct Answer: (A)
void MyClass::myFunction() { }
Explanation: The correct way to define a function outside a class is 'void MyClass::myFunction() { }'.