Q. What is the output of the following code snippet? int x = 10; int y = 20; cout << (x << 1);
β
Correct Answer: (B)
20
Explanation: The left shift operator (<<) shifts the bits of x to the left by 1, effectively multiplying x by 2. So, 10 << 1 = 20.