// Anonymous function = A function with no identifier.
#include <iostream>
int main() {
// Anonymous function (lambda) assigned to a variable.
// This lambda takes two integers and returns their sum.
auto add = [](int a, int b) {
return a + b;
};
// Use the anonymous function
int result = add(10, 20);
std::cout << result << std::endl;
}
/*
run:
30
*/