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 logical AND operator (&&) returns true (1) if both x and y are non-zero.
Explanation by: Rakesh Kumar
The logical AND operator (&&) returns true (1) if both x and y are non-zero.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
136
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Rakesh Kumar
Publisher
πŸ“ˆ
95%
Success Rate