0
#include <iostream> using namespace std; int main() { int a=10,c=2,b; b=a>>c; cout<<b; return 0; }
why output is 24?
2 Answers
+ 2
Output should be 2 not 24.
10 >> 2 = 2
10 in binary = 1010 right shift 2 = 0010 = 2
0
sorry..I posted wrong question..