第30775题 单选题
阅读如下C++代码,其运行输出结果为?
#include <iostream>
using namespace std;
int main() {
    int n = 181, count = 0;
    while (n) {
        n &= n - 1;
        count++;
    }
    cout << count << endl;
    return 0;
}
A

5

B

6

C

7

D

8

程序运行统计
暂无判题统计
提交0次 正确率0.00%
答案解析