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

Explanation: The compound assignment operator (/=) divides x by y and returns the new value of x, which is 0 (integer division).

Explanation by: Gopal Sharma
The compound assignment operator (/=) divides x by y and returns the new value of x, which is 0 (integer division).

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
183
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Gopal Sharma
Publisher
πŸ“ˆ
87%
Success Rate