int Calc(unsigned int x) { int count=0; while(x) { printf(”x=%i/n”,x); count++; x=x&(x-1); } return count; } 问Calc(9999)的值是多少。 x = x&(x-1) 的作用是将x最右边的1变为0; 9999 的二进制表示为 10011100001111。所以 Calc(9999) 的值为8.