What is output? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

What is output?

int main() { int a,b; a=10; b=15; int c; c=10>>2; cout<<c; }

12th Feb 2017, 4:44 PM
Parth Nakrani
Parth Nakrani - avatar
2 Answers
+ 3
it's 2. If you convert 10 from decimal system to binary you will get 1010. Shifting two positions to the right you will get 10, that is 2 in decimal system.
12th Feb 2017, 5:31 PM
Kleber Leal
Kleber Leal - avatar
+ 2
thanks...kleber Leal
13th Feb 2017, 4:15 PM
Parth Nakrani
Parth Nakrani - avatar