59.0k views
3 votes
A lambda expression is typically used:_________.

a. for functions that are only used once
b. for simple functions
c. for functions that need to accept multiple data types
d. all of the above
e. a and b only

1 Answer

4 votes

Answer:

e. a and b only

Explanation:

Question - A lambda expression is typically used ?

Solution -

The correct option is - e. a and b only

Reason -

As we know that, lambda expression is used to define anonymous function object.

So,

It is used when the function is short or the function is simple.

And it is used for the functions that are only used once.

So,

a. for functions that are only used once

b. for simple functions

a and b both parts are correct.

So,

The correct option is - e. a and b only

User Netrox
by
6.2k points