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