Q. What will be the output of the following C++ code?

int x = 10;
int y = 5;
cout << x / y;

  • (A) 5
  • (B) 2
  • (C) 10
  • (D) None of the above
πŸ’¬ Discuss
βœ… Correct Answer: (A) 5
Explanation: In integer division, the result is the quotient of the division. So, 10 / 5 equals 2.
Explanation by: Vikash Gupta
In integer division, the result is the quotient of the division. So, 10 / 5 equals 2.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
199
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Vikash Gupta
Publisher
πŸ“ˆ
93%
Success Rate