1. 以下选项中能表示合法常量的是(  )。

Select one:
a. '\'
b. 1.5E2.0
c. "\007"
d. 1,200 C语言基础知识错误总结_5e

Feedback

The correct answer is: "\007"

 

2. 下列叙述中正确的是(  )

Select one:
a. 在switch语句中必须使用default C语言基础知识错误总结_5e
b. break语句只能用于switch语句
c. 在switch语句中,不一定使用break语句
d. break语句必须与switch语句中的case配对使用

Feedback

The correct answer is: 在switch语句中,不一定使用break语句

 

3. 若变量已正确定义,在if(W)printf(”%d\n”,k);中,以下不可替代w的是(  )。

Select one:
a. a!=c
b. a>bc
c. ch=getchar() C语言基础知识错误总结_5e
d. a==(b+c)

Feedback

The correct answer is: a>bc

 

4. 以下不构成无限循环的语句或语句组是(  )。

Select one:
a. n=0;
  while(1){n++;}
b. for(n=0,i=1;;i++)n+=i;
c. n=0:
  do{++n;}while(n<=0);
d. n=10;
  while(n){n--;} C语言基础知识错误总结_5e

Feedback

The correct answer is: n=0:
  do{++n;}while(n<=0);

 

5. 在C语言中,合法的长整型常数是(  )。

Select one:
a. 4962717 C语言基础知识错误总结_5e
b. 9L
c. 0.123456
d. 5.321e2

Feedback

The correct answer is: 9L

 

6. C语言主要是借助以下哪个功能来实现程序模块化

Select one:
a. 定义函数
b. 丰富的数据类型
c. 定义常量和外部变量
d. 三种基本结构语句 C语言基础知识错误总结_5e

Feedback

The correct answer is: 定义函数

 

永远渴望,大智若愚(stay hungry, stay foolish)