Q799
What will be the output of the following C++ code? #include using namespace std; int main() int a = 5; auto check = [&]() a = 10; ; check(); cout<<"Value of a: "<<a<<endl; return 0;
A.
Value of a: 5
B.
Value of a: 10
AnswerC.
Error
D.
Segmentation fault
Answer: Option B
Solution
Answer: Option B
No explanation is given for this question Let's Discuss on Board