πŸ“Š C++
Q. What is the output of the following code snippet? int x = 10; int y = 20; cout << (x -= y);
  • (A) 10
  • (B) 20
  • (C) -10
  • (D) Error
πŸ’¬ Discuss
βœ… Correct Answer: (C) -10

Explanation: The compound assignment operator (-=) subtracts y from x and returns the new value of x, which is -10.

Explanation by: Vikash Gupta
The compound assignment operator (-=) subtracts y from x and returns the new value of x, which is -10.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
185
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Vikash Gupta
Publisher
πŸ“ˆ
82%
Success Rate