Saved Bookmarks
| 1. |
What is the syntax of defining lambda expression?(a) [capture clause](parameters) -> return_type { body of the function }(b) [parameters](capture clause) -> return_type { body of the function }(c) [parameters:capture clause]() -> return_type { body of the function }(d) [capture clause:parameters]() -> return_type { body of the function }I had been asked this question in an interview.My query is from Lambda Expressions topic in portion C++ Advanced of C++ |
|
Answer» Correct answer is (a) [capture CLAUSE](parameters) -> return_type { body of the FUNCTION } |
|