设为首页 加入收藏

TOP

计算机等级考试二级C语言模拟试卷(六)(二)
2023-07-23 13:31:33 】 浏览:276
Tags:计算机
=3.14;,则表达式'A'+a+b值的类型是

A)char                   B)int                     C)double                  D)float

(15)若有定义语句:int x=12,y=8,z;,在其后执行语句z=0.9+x/y;,则z的值为

A)1                       B)1.9                     C)2                          D)2.4

(16)若有定义:int a,b;,通过语句scanf("%d;%d",&a,&B);,能把整数3赋给变量a,5

赋给变量b的输入数据是

A)3 5                    B)3,5                     C)3;5                       D)35

(17)若有定义语句:int k1=10,k2=20;,执行表达式(k1=k1>k2)&&(k2=k2>k1)后,k1和k2的值分别为

A)0和1                B)0和20               C)10和1                 D)10和20

(18)有以下程序

#include  <stdio.h>

main()

{  

        int a=1,b=0;

if (--a) b++;

else if(a==0)  b+=2;

else  b+=3;

printf("%d\n",b);

)

程序运行后的输出结果是

A)0                       B)1                       C)2                          D)3

(19)下列条件语句中,输出结果与其他语句不同的是

A)if  (a)printf("%d\n",x); else printf("%d\n",y);

B)if  (a==0)  printf("%d\n",y); else printf("%d\n",x);

C)if  (a!=0)  printf ("%d\n",x); else printf("%d\n",y);

D)if  (a==0)  printf("%d\n",x); else printf("%d\n",y);

(20)有以下程序

#include   <stdio.h>

main()

int a=7;

while(a--);

printf("%d\n",a);

)

程序运行后的输出结果是

A)-1                      B)0              &nbs

首页 上一页 1 2 3 4 5 6 7 下一页 尾页 2/7/7
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇OpenGL ES EGL eglMakeCurrent 下一篇OpenGL ES EGL eglDestroySurface

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目