Q. What is the output of the following code snippet? int x = 10; int y = 20; cout << (x = y);
β
Correct Answer: (B)
20
Explanation: The assignment operator (=) assigns the value of y to x and returns the value of y, which is 20.