第35418题 单选题
下面C++代码拟用于计算整数N的位数,比如对123则输出123是3位整数,但代码中可能存在bug。下面有关描述正确的是( )。
int N, N0, rc = 0;
cout << "请输入整数:";
cin >> N;

N0 = N;
while (N) {
    rc++;
    N /= 10;
}

printf("%d是%d位整数\n", N, rc); // L11
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
知识点:
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析