7.下列各选项都是在C程字中的注释,其中注释方法错误的是()。
A. void main(/*int argc, char, *argv[ ]*/)
B. void main()
{ } {pri/*remark*/ntf("ok");}
C. void main()
D. void main()
{ int y/*=8*/;{ int y=8;
printf("%d", y); /*printf(" %d", y);*/
} }
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3ef-4070-c003-bc7499099f01.html
点击查看答案
10.在C语言中while和do-while循环的主要区别是( )。
A. do-while的循环体至少无条件执行一次
B. do-while允许从外部转到循环体内
C. while的循环控制条件比do-while的循环控制条件严格
D. do-while的循环体不能是复合语句
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f1-a5b8-c003-bc7499099f01.html
点击查看答案
4.下面表示数学式“x<y<z”的逻辑表达式中,错误的是( )。
A. x<y<z
B. x<y&&y<z
C. !(x>=y)&&!(y>=z)
D. !(x>=y||y>=z)
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f0-ee20-c003-bc7499099f00.html
点击查看答案
8.C语言中,形参缺省的存储类型说明是( )。
A. auto
B. static
C. register
D. extern
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f4-f560-c003-bc7499099f00.html
点击查看答案
11.输入一个正整数n,再输入n个学生的成绩,计算平均分,并统计不及格成绩的个数。
#include
int main( )
{ int count, i, n;
double grade, total;
printf( );
scanf( );
total = 0;
( (22) );
for(i = 1; i <= n; i++)
{printf( );
scanf ( );
total = total + grade;
if(( (23) ))
count++;
}
printf("Grade average = %.2f\n", total/n);
printf( );
return 0;
}
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f2-49c8-c003-bc7499099f00.html
点击查看答案
6.下面程序运行后输出的结果是________。
#include
int main()
{ int i,j,m=55;
for(i=1;i<=3;i++)
for(j=3;j<=i;j++)
m=m%j;
printf( );
return 0;
}
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f1-ccc8-c003-bc7499099f00.html
点击查看答案
17.double18.619.long int20.0x或0X
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3ef-d4e0-c003-bc7499099f01.html
点击查看答案
21.D22.C23.A24.B25.C26.A
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f1-5b80-c003-bc7499099f01.html
点击查看答案
24.表达式“'A'+4*25.0-'b'”的正确结果是________。
A. 67
B. 67.0
C. 不确定
D. 67L
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3ef-7338-c003-bc7499099f00.html
点击查看答案
4.下面程序运行时输出结果是________。
#include
int main()
{int a=0, b=2;
switch( )
{case 1: printf("1");
case 2: printf("2");
case 3: printf("3\n");break;
default: printf( );
}
return 0;
}
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f1-4be0-c003-bc7499099f00.html
点击查看答案