12.在下面程序的main()函数中,语句“f( );”内的实参a表示数组a的( )。
void f( )
{ int k; for( )a[k]++; }
int main()
{ int a[10]={0};f( ); return 0; }
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f4-e1d8-c003-bc7499099f00.html
点击查看答案
19.已有定义“int a[3][2]={1, 2, 3, 4, 5, 6};”,数组元素________的值为6。
A. a[3][2]
B. a[2][1]
C. a[1][2]
D. a[2][3]
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f2-e220-c003-bc7499099f00.html
点击查看答案
38.下列选项中可用作变量名的是( )。
A. Case
B. a-b
C. $cd
D. 2ab
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3ef-9660-c003-bc7499099f01.html
点击查看答案
36.下面选项中,不能作为C语言合法常量的是( )。
A. 0.3e+5
B. 'cd'
C. '\013'
D. "a"
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3ef-9278-c003-bc7499099f00.html
点击查看答案
11.下面程序运行后输出的结果是________。
#include
int main()
{ int x=3;
do
{printf("%3d", x=x-3);
}while( );
return 0;
}
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f1-dc68-c003-bc7499099f00.html
点击查看答案
42.下面程序在编译时在第4行报错“error C2082: 形参“m”的重定义”,若要修改第4行的局部变量m的名字,则下列选项中不能使用的是( )。
#include
int y;
void f( )
{ int n; double m=1;
printf( );
}
int main()
{ int e=1;f( ); return 0;}
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f5-4768-c003-bc7499099f00.html
点击查看答案
5.若有定义“int i=7;float x=3.1415;double y=3;”,表达式“i+'a'*x+i/y”值的类型是________型。
A.
B.
C.
D.
E.
F.
G.
H.
I.
J.
解析:
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3ef-1d48-c003-bc7499099f03.html
点击查看答案
13.下面程序运行时输出的结果是()。
#include
int main()
{ int a[12]={1, 2, 3, 4, 4, 3, 2, 1, 1, 1, 2, 3}, b[5]={0}, i, k;
for(i=0; i<12; i++)
{ k=a[i];
b[k]++;
}
for(i=1; i<5; i++)
printf("%2d", b[i]);
}
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f3-4b98-c003-bc7499099f00.html
点击查看答案
12.下面程序是用递归算法输出杨辉三角形。
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f6-8ba0-c003-bc7499099f00.html
点击查看答案
40.在下面各组标识符中,均可以用作变量名的一组是( )。
A. a02, Int
B. table_1, a*.0
C. 0_a, W13
D. for, point
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3ef-9a48-c003-bc7499099f00.html
点击查看答案