πŸ“Š C++
Q. What is the output of the following C++ code?

int a = 7;
cout << a >> 1;
  • (A) 14
  • (B) 3
  • (C) 7
  • (D) 1
πŸ’¬ Discuss
βœ… Correct Answer: (B) 3

Explanation: The '>>' operator is the right shift operator. Shifting 7 by 1 bit results in 3.

Explanation by: Vikash Gupta
The '>>' operator is the right shift operator. Shifting 7 by 1 bit results in 3.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
95
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Vikash Gupta
Publisher
πŸ“ˆ
85%
Success Rate