0
What is the output of the following C++ program?
#include <iostream>
using namespace std;
int main() {
int n = 1;
auto f = [n]() mutable { return ++n; };
int a = f();
int b = f();
cout << a << " " << b << " " << n;
return 0;
}- A2 3 1
- B2 2 1
- C2 3 3
- D2 3 2
Correct answer: A