If the value of the right operand is negative or is
greater than or equal to the width of the promoted left operand, the behavior is undefined.
main()
{
int bits = 32;
printf("%d\n",(int)1 << (int)32);//0
printf("%d\n",(int)1 << bits);//1
}
|
阅读(1259) | 评论(1) | 转发(0) |