20.若有以下程序
![](https://yi2.oss-cn-shenzhen.aliyuncs.com/00008152ffacd86ec0f89874dcef4300.png)
( )
A. 若只在主函数中对函数f进行说明,则只能在主函数中正确调用函数f
B. 若在主函数前对函数f进行说明,则在主函数和其后的其他函数中都可以正确调用函数f
C. 对于以上程序,编译时系统会提示出错信息:提示对f函数重复说明
D. 函数f无返回值,所以可用void将其类型定义为无返回值型
https://www.shititong.cn/cha-kan/shiti/00008158-0ae4-d9b2-c0f8-9874dcef4300.html
点击查看答案
27.若有以下程序
![](https://yi2.oss-cn-shenzhen.aliyuncs.com/6c39cd7b384a40aba0c75ae9cca8211d.png)
上面程序输出结果是
https://www.shititong.cn/cha-kan/shiti/00008150-0e25-f701-c0f8-9874dcef4300.html
点击查看答案
18.有一堆零件(100到200之间),如果分成4个零件一组的若干组,则多2个零件;若分成7个零件一组,则多3个零件;若分成9个零件一组,则多5个零件。下面程序
![](https://yi2.oss-cn-shenzhen.aliyuncs.com/000081357b0d372bc0f89874dcef4300.png)
是求这堆零件总数,请选择填空。( )
A. i%9=5
B. i%9!=5
C. (i-5)%9!=0
D. (i-5)%9==0
https://www.shititong.cn/cha-kan/shiti/0000813e-e8f3-402f-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
点击查看答案
30.C语言中while和do-while循环的主要区别是( )
A. do-while的循环体至少无条件执行一次
B. while的循环控制条件比do-while的循环控制条件更严格
C. do-while允许从外部转到循环体内
D. do-while的循环体不能是复合语句
https://www.shititong.cn/cha-kan/shiti/0000813e-e8f3-5b5e-c0f8-9874dcef4300.html
点击查看答案
10.以下所列的各函数首部中,正确的是( )
A. void play(vata:Integer,varb:Integer)
B. void play(inta,b)
C. void play(inta,intb)
D. Sub play(aasinteger,basinteger)
https://www.shititong.cn/cha-kan/shiti/00008158-0ae4-c4e6-c0f8-9874dcef4300.html
点击查看答案
22.以下程序
![](https://yi2.oss-cn-shenzhen.aliyuncs.com/00008152ffada9b0c0f89874dcef4300.png)
有语法错误,有关错误原因的正确说法是( )
A. 语句voidprtⱣⱤchar();有错,它是函数调用语句,不能用void说明
B. 变量名不能使用大写字母
C. 函数说明和函数调用语句之间有矛盾
D. 函数名不能使用下划线
https://www.shititong.cn/cha-kan/shiti/00008158-0ae4-dd7c-c0f8-9874dcef4300.html
点击查看答案
29.下列说法
![](https://yi2.oss-cn-shenzhen.aliyuncs.com/000081357b12edaec0f89874dcef4300.png)
正确的是( )
A. 最多的执行10次
B. 最多执行9次
C. 是无限循环
D. 循环体一次也不执行
https://www.shititong.cn/cha-kan/shiti/0000813e-e8f3-58e8-c0f8-9874dcef4300.html
点击查看答案
8、下列四组字符串中都可以用作C语言程序中的标识符的是
![](https://yi2.oss-cn-shenzhen.aliyuncs.com/0000815ab72eb149c0f89874dcef4300.png)
( )。
解析:解析:选项B中的”\”,”$”,选项D中”>“,”#”,”.”,”-”不满足(1);选项C中的while为关键字,不满足(3)
https://www.shititong.cn/cha-kan/shiti/00008160-060e-e57f-c0f8-9874dcef4300.html
点击查看答案
31.现有定义intk=1;则执行语句while(++k<4);后,k的值为( )
https://www.shititong.cn/cha-kan/shiti/0000813e-e8f3-5d4a-c0f8-9874dcef4300.html
点击查看答案