int w=6;
w=w<<5;
cout<<w<<endl;
why output of this code is coming 192
int w=6;
w=w<<5;
cout<<w<<endl;
why output of this code is coming 192
so a<<i shifts the bits of a by i to the left
its equivalent to a*2^i so here a=6 and i=5 so => 6*(2^5)=6*32=192
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.