Vidyalelo
C++ Programming · Q571

C++ miscellaneous

Programming · C++ Programming · question 571

Q571

What will be the output of the following C++ code? #include using namespace std; int main() int x = 5; auto check = []() -> bool if(x == 0) return false; else return true; ; cout<<check()<<endl; return 0;

A.
1
B.
0
C.
Error
Answer
D.
Segmentation fault

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board