πŸ“Š C++
Q. Which of the following is the correct way to define a lambda function in C++?
  • (A) auto myLambda = [](int x) { return x * x; };
  • (B) lambda myLambda = [](int x) { return x * x; };
  • (C) Both A and B
  • (D) None of the above
πŸ’¬ Discuss
βœ… 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; };'.

Explanation by: Vinay
The correct way to define a lambda function is 'auto myLambda = [](int x) { return x * x; };'.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
187
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Vinay
Publisher
πŸ“ˆ
83%
Success Rate