Q. Which of the following is the correct way to define a lambda function in C++?
β
Correct Answer: (A)
auto myLambda = [](int x) { return x * x; };
Explanation: The correct way to define a lambda function is 'auto myLambda = [](int x) { return x * x; };'.