A-A+

求下面函数的返回值(微软)int func(x){int countx = 0;while(x){countx ++;x = x&(x-1);}r

2020-09-18 20:51:56 资格考试 阅读

问题详情

求下面函数的返回值(微软)

int func(x)

{

int countx = 0;

while(x)

{

countx ++;

x = x&(x-1);

}

return countx;

}

参考答案

考点: