1.

What is the correct statement about lambda expression?(a) The return type of lambda expression can be neglected in some cases(b) The return type of lambda expression must be specified in all cases(c) Lambda expression should be very large functions(d) Lambda expression is also available in CThis question was posed to me in an interview for internship.This intriguing question comes from Lambda Expressions in division C++ Advanced of C++

Answer»

Correct answer is (a) The return type of lambda expression can be neglected in some cases

Explanation: Return type in lambda expression can be ignored in some cases as the COMPILER will itself FIGURE that out but not in all cases. Lambda expression is used to define small FUNCTIONS, not large functions. Lambda expression is introduced in C++.



Discussion

No Comment Found

Related InterviewSolutions