Q. What is the output of the following code snippet? int x = 10; int y = 20; cout << (x = y);

  • (A) 10
  • (B) 20
  • (C) 0
  • (D) Error
πŸ’¬ Discuss
βœ… Correct Answer: (B) 20
Explanation: The assignment operator (=) assigns the value of y to x and returns the value of y, which is 20.
Explanation by: Rakesh Kumar
The assignment operator (=) assigns the value of y to x and returns the value of y, which is 20.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
122
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Rakesh Kumar
Publisher
πŸ“ˆ
92%
Success Rate