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

  • (A) 0
  • (B) 1
  • (C) 10
  • (D) 20
πŸ’¬ Discuss
βœ… Correct Answer: (B) 1
Explanation: The inequality operator (!=) returns true (1) if the operands are not equal.
Explanation by: Shiva Ram
The inequality operator (!=) returns true (1) if the operands are not equal.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
171
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Shiva Ram
Publisher
πŸ“ˆ
82%
Success Rate