+ 1
int c = 8 << 2; printf("%d",c); what will be the output?
Can anyone explain with explanation.
4 Antworten
+ 4
should be 32.
128 64 32 16 8 4 2 0
start at 8 and move left 2
+ 4
c = 8<<2
c = 00001000<<2 =00100000=32
⬅️ ↔️
printf("%d",c);
//Output: 32
Just an explanation of Slick
+ 3
The << is bitwise operator. I suggest you check this.
https://www.sololearn.com/learn/4087/?ref=app