Intermediate
C++
Q53 / 100
What is a lambda expression in C++11?
Correct! Well done.
Incorrect.
The correct answer is B) An anonymous function object defined inline, optionally capturing surrounding variables
B
Correct Answer
An anonymous function object defined inline, optionally capturing surrounding variables
Explanation
[&](int x) { return x + y; } is a lambda capturing y by reference. [=] captures by value. The compiler generates a closure class.
Progress
53/100