C语言错题库

1.属于合法的C语言长整型常量的是_____。

A.5816273    B.0L    C.2E10    D.(long)5816273

答案:0L

2.

#include <iostream>
using namespace std;

int main()
{
        int k = 2;
        while(k=1)   //无论k是什么值,此处被赋值为1,该循环为死循环
            k=k-1;
        cout << "I am here" << endl;
}

3.

原文地址:https://www.cnblogs.com/lijitao/p/12114322.html