Vidyalelo
C++ Programming · Q643

C++ miscellaneous

Programming · C++ Programming · question 643

Q643

Which is the correct syntax of capturing a variable 'X' by reference and other variable 'Y' by value in lambda expression?

A.
[&X, Y]
Answer
B.
[X, &y]
C.
[X, Y]
D.
[&x, &Y]

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board