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 }

1 thought on “What is the syntax of defining lambda expression?”

  1. a
    Explanation: The correct syntax of defining a lambda expression is given below:
    [capture clause](parameters) -> return_type
    {
    the body of the function
    }

Leave a Comment