17.以下对一维数组a的正确说明是:( )
A. chara(10);
B. inta[];
C. intk=5,a[k];
D. chara[3]={‘a’,’b’,’c’};
解析:解析:详见教材P143~144,一维数组的定义、初始化类型符数组名[常量表达式]类型符是指数组中数组元素的类型;数组名要符合标识符命名规则;常量表达式是指数组的长度(数组中包含元素的个数),其值只能是整数,不可以是变量,而且从1开始计数。选项A,常量表达式只能放在中括号[]中选项B,只有在对数组初始化(即赋值)的时候才可以省略数组的长度,B中并未对a进行初始化。选项C,常量表达式不能为变量。
https://www.shititong.cn/cha-kan/shiti/00008160-060e-f90c-c0f8-9874dcef4300.html
点击查看答案
5.分析以下程序
![](https://yi2.oss-cn-shenzhen.aliyuncs.com/00008115921a8ff0c0f89874dcef4300.png)
,下列说法正确的是( )
A. 有语法错,不能通过编译
B. 通过编译,但不能连接
C. 输出****
D. 输出####
https://www.shititong.cn/cha-kan/shiti/00008132-6116-0ab1-c0f8-9874dcef4300.html
点击查看答案
3.以下能正确定义数组并正确赋初值的语句是
![](https://yi2.oss-cn-shenzhen.aliyuncs.com/58a7e16c4e6f486186b5f580c68fcc06.png)
( )。
https://www.shititong.cn/cha-kan/shiti/00008150-0e25-c57d-c0f8-9874dcef4300.html
点击查看答案
9.若变量已正确定义并赋值,以下符合C语言语法的表达式是( )
A. a:=b+1
B. a=b=c+2
C. int18.5%3
D. a=a+7=c+b
https://www.shititong.cn/cha-kan/shiti/00008112-f312-eed7-c0f8-9874dcef4300.html
点击查看答案
34.下面函数
![](https://yi2.oss-cn-shenzhen.aliyuncs.com/00008152ffb1d58ec0f89874dcef4300.png)
调用语句含有实参的个数为( )
https://www.shititong.cn/cha-kan/shiti/00008158-0ae4-f76e-c0f8-9874dcef4300.html
点击查看答案
29.下面四个选项中
![](https://yi2.oss-cn-shenzhen.aliyuncs.com/0000810a0d0ae06dc0f89874dcef4300.png)
,均是合法整型常量的选项是( )
https://www.shititong.cn/cha-kan/shiti/00008112-f313-1b2f-c0f8-9874dcef4300.html
点击查看答案
11.C语言中运算对象必须是整型的运算符是( )
https://www.shititong.cn/cha-kan/shiti/00008112-f312-f29a-c0f8-9874dcef4300.html
点击查看答案
8.假定int类型变量占用两个字节,其有定义:intx[10]={0,2,4};,则数组x在内存中所占字节数是D
https://www.shititong.cn/cha-kan/shiti/00008150-0e25-cfc3-c0f8-9874dcef4300.html
点击查看答案
44.下列程序
![](https://yi2.oss-cn-shenzhen.aliyuncs.com/65c42cca551f4ab0b41b491e0febc6f8.png)
是用来判断数组中特定元素的位置所在。如果输入如下整数:
A. 7431
B. 6
C. 980
D. 6980
https://www.shititong.cn/cha-kan/shiti/00008150-0e26-19d3-c0f8-9874dcef4300.html
点击查看答案
13.以下函数值
![](https://yi2.oss-cn-shenzhen.aliyuncs.com/00008152ffb7f9b1c0f89874dcef4300.png)
的类型是( )
A. int
B. 不确定
C. void
D. float
https://www.shititong.cn/cha-kan/shiti/00008158-0ae4-cb23-c0f8-9874dcef4300.html
点击查看答案