Quiz · Functions · lesson 12 of 13
Quiz — what the lambda captures
What does the program print?
#include <iostream>
int main() {
int x = 1;
auto get = [x]() { return x; };
x = 5;
std::cout << get() << ' ' << x;
}Subscribe to take the course
The course is free. Sign in with Telegram and subscribe to the channel to open every lesson.