1.

In how many ways we can capture the external variables in the lambda expression?(a) 1(b) 2(c) 3(d) 4This question was posed to me by my school principal while I was bunking the class.The question is from Lambda Expressions topic in portion C++ Advanced of C++

Answer»

The CORRECT ANSWER is (c) 3

To EXPLAIN: There are three WAYS in which we can capture the external VARIABLES inside the lambda expression namely capture by reference, capture by value and capture by both that is mixed capture.



Discussion

No Comment Found

Related InterviewSolutions