请教个C语言问题
int fun(unsigned char x){
int cnt=0;
while(x)
{
cnt++;
x=x&(x-1);
}
printf("cnt is %d\n",cnt);
}
void main()
{
fun(99);
}
请问函数fun的功能是什么?
2012-10-16 00:12

2012-10-16 02:17

2012-10-16 06:38
2012-10-16 07:55
2012-10-16 08:25

....
2012-10-16 09:47
2012-10-16 10:26

2012-10-16 13:09
2012-10-16 13:55
2012-10-16 14:38