Q. Which of the following is the correct way to define a function with a default argument in C++?
β
Correct Answer: (A)
void myFunction(int x = 10) { }
Explanation: The correct way to define a function with a default argument is 'void myFunction(int x = 10) { }'.