main()
{
int i=-1,j=32,k;
k=i<<j;
printf("i=%d j=%d k=%d\n",i,j,k);
}
output:
i=-1 j=32,k=-1
If I am taking j=33 then k=-2
and if j=34 then k=-4.its repeating after 32 times left shift i.e if j=64,k becomes -1 and if j=65 then k=-2.but logically bit should be lost i.e output is 0.what is happening here.
Sorry for asking such a question. I am beginner so I'm unable to understand what the compiler does here. Can you explain?