计算机二级C语言程序设计
免费题库
有如下定义 struct person{char name[9]; int age;}; struct person class[10] = { "John",17, "Paul",19, "Mary",18, "Adam",16,};根据上述定义,能输出字母M的语句是______。
以下程序的输出结果是______。main(){ int n=4;while(n--)printf("%d ",--n);}
以下不能用于描述算法的是______。
以下程序的输出结果是______。f(int b[],int m,int n){ int i,s=0;for(i=m;i
有以下程序#include main(){ int x=1,y=0,a=0,b=0;switch(x){case 1:switch(y){ case 0: a++;break;case 1: b++;break;}case 2: a++;b++;break;case 3: a++;b++;}printf("a=%d,b=%d\n",a,b);}程序的运行结果是______。
设有函数说明语句:int fun(int,int);以及函数指针定义语句:int (*f) (int, int);若要使函数指针指向函数fun的入口地址,以下选项中正确的是______。
若已定义:int a[9],*p=a;并在以后的语句中未改变p的值,不能表示a[1]地址的表达式是______。
有以下程序 #include void fun( int x, int y, int *c, int *d ) { *c = x+y; *d = x-y; } main() { int a=4, b=3, c=0, d=0; fun ( a, b, &c, &d ); printf( "%d %d\n" , c, d ); }程序的输出结果是______。
有如下定义struct st{ int x; float y;} rec,*px;若要使指针px指向rec的成员x,正确的赋值语句是______。
以下程序中给数组所有元素输入数据,请从选项中选择正确的答案填入下划线处______。#include main(){int a[10], i=0;while( i
«
1
2
...
33
34
35
36
37
38
39
...
42
43
»