2026年c语言期中考试编程题必考.docVIP

  • 2
  • 0
  • 约4.49千字
  • 约 12页
  • 2026-06-27 发布于中国
  • 举报

2026年c语言期中考试编程题必考

姓名:_____?准考证号:_____?得分:______

一、单选题(总共10题,每题2分)

1.下列哪个选项不是C语言的数据类型?

A.int

B.float

C.boolean

D.char

2.在C语言中,以下哪个语句是正确的?

A.if(x=y)

B.if(x==y)

C.ifx=y

D.ifx==ythen

3.以下哪个运算符的优先级最高?

A.+

B.

C.==

D.

4.以下哪个选项是正确的字符串定义?

A.charstr[]=hello;

B.charstr=hello;

C.charstr[5]=hello;

D.charstr[]={h,e,l,l,o};

5.以下哪个选项是正确的函数定义?

A.voidfun(intx,inty){returnx+y;}

B.intfun(intx,inty){returnx+y;}

C.v

文档评论(0)

1亿VIP精品文档

相关文档