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 expression (x / y) evaluates to 0 because both x and y are integers.
Explanation by: Praveen Singh
The expression (x / y) evaluates to 0 because both x and y are integers.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
103
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Praveen Singh
Publisher
πŸ“ˆ
92%
Success Rate