25.若有定义“int k,a,b;unsigned long w=8;double x=2.9;”,则下面不符合C语言语法的表达式是________。
A. x%(-3)
B. w*=-2
C. k=(a=6,b=4,a-b)
D. a*=a+=a-=(b=4)*(a=3)
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3ef-7720-c003-bc7499099f00.html
点击查看答案
18.已有定义“int a=7, b=2;”,则表达式“b+=( )( )/2”运算后b的值为( )。
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3ef-2ce8-c003-bc7499099f02.html
点击查看答案
17.执行“printf("%x",100);”后的输出结果是________。
A. 100
B. 0x100
C. 0X64
D. 64
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f0-32a0-c003-bc7499099f01.html
点击查看答案
16.本程序的功能是:将一个整数a转换成十六进制数字字符串输出。例如,当a=125时,程序输出的结果为“0x7D”。
#include
void convert( )
{ int i=0, j=0, k, r, t[10];
if (n<0)
{ a[j++]='-'; n= -n;}
a[j++]='0';
a[j++]='x';
while(( (43) ))
{ r = n%16;
if(r<10)t[i]=r+'0';
else t[i]=( (44) );
n=n/16;
i++;
}
for (k=( (45) ); k>=0; k--, j++)
a[j] = t[k];
}
int main()
{ char ch=125,a[10]={0};
convert( );
puts( );
return 0;
}
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f6-ce08-c003-bc7499099f00.html
点击查看答案
2.下面程序运行时输出的结果是()。
#include
int main()
{ int m=1, n, i;
for(i=0;i<5;i++)
{ int m=1;
m++;
if(i==4)n=m;
}
printf( );
return 0;
}
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f1-bd28-c003-bc7499099f00.html
点击查看答案
8.C 语言源程序的3种基本结构是顺序结构、( )结构和循环结构。
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3ef-01f0-c003-bc7499099f00.html
点击查看答案
15.要调用数学函数时,在#include命令行中应包含( )。
A. stdio.h
B. string.h
C. math.h
D. ctype.h
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f0-2eb8-c003-bc7499099f00.html
点击查看答案
1.下面程序运行时输出的结果是( )。
#include
int main( )
{ int i;
for(i=1;i<6;i++)
{if(i%2)
printf("*");
else
printf("#");
}
return 0;
}
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f1-b940-c003-bc7499099f00.html
点击查看答案
5.extern6.函数调用语句( )7.static
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f7-1c28-c003-bc7499099f01.html
点击查看答案
17.918.1619.3 220.2
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f7-2fb0-c003-bc7499099f01.html
点击查看答案