Question PRG-CPP-0066
HardWhat is the output of this program?
#include <iostream>
using namespace std;
int main() {
int a = 5;
auto f = [a]() mutable { a += 10; return a; };
cout << f() << " " << f() << " " << a;
return 0;
}
- A.
15 25 25
- B.
15 25 5
- C.
Sign up free to see the answer and a step-by-step explanation.