What is the output?Int x=2;x=x<<2;printf(%d ,x);
Computer Science
preet6817
Question
What is the output?Int x=2;x=x<<2;printf("%d ",x);
1 Answer
-
1. User Answers gurukulamdivya
Here is your Answer:
8
Explanation:
Int x=2;
x=x<<2;
printf("%d ",x);
the value of x << 2, x shifted to left 2 times means x multiplied by 2 for 2 times, i.e. 2 * 2 * 2 = 8