二级c语言
二级C语言是全国计算机等级考试中的一项,是很多非计算机专业朋友需要获得的证书,这里收集大量的二级C语言相关的教程和题目
-
下列与栈结构有关联的是( )。
-
构成C语言程序的三种基本结构是( )。
-
若主函数中有定义语句:int a[10],b[10],c;在主函数前定义的fun函数首部为void fun(int x[])则以下选项中错误的调用语句是( )。
-
对图书进行编目时,图书有如下属性:ISBN书号,书名,作者, 出版社,出版日期。能作为关键字的是( )。
-
有以下程序:#include <stdio.h> #include <math.h> main() { int i,j,x = 0; for(i = 0;i < 2;i++) { x++; for(j = 0;j <= 3;j++) { if(j%2==0)continue; x++; } x++; } printf("x = %d\n",x); }程序的运行结果是( )。
-
在下列链表中,能够从任意一个结点出发直接访问到所有结点的 是( )。
-
有以下程序:#include <stdio.h> #define N 4 void fun(int a[][N],int b[]) { int i; for(i=0;i<n;i++) b[i]=a[i][N-1-i]; } main() { intm x[N][N]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16},y[N],i; fun(x,y); for(i=0;i<N;i++) printf("%d,",y[i]); printf("\n");程序的运行结果是( )。
-
设x,y,z均为实型变量,代数式 在C语言中的正确写法是 ( )。
-
下面对软件特点描述不正确的是( )。
-
在E-R图中,表示实体的图形是( )。
-
设变量x为long int型并已正确赋值,以下表达式中能将x的百位上 的数字提取出的是( )。
-
有以下程序:#include <stdio.h> void fun(char(*p)[6]) { int i; for(i=0;i<4;i++)printf("%c",p[i][i]); printf("\n"); } main() { char s[6][6] = {"ABCD", "abcde", "12345", "FGHIJ", "fghij", "54321"}; fun(s); }程序的运行结果是( )。
-
有以下程序:#include <stdio.h> main() { int k,n=0;char c,str[]="teach"; for(k=0;str[k];k++) { c=str[k]; switch(k) { casel: case3: case5: putchar(C); printf("%d",++n); break; default:putchar('N'); } } }程序的运行结果是( )。
-
C语言程序中,若函数无返回值,则应该对函数说明的类型是 ( )。
-
有以下程序:#include <stdio.h> main() { int i,j,k,a=5,b=6; i=(a==b)?++a:--b; j=a++; k=b; printf("%d,%d,%d\n",i,j,k); }程序的运行结果是( )。
-
下面属于黑盒测试方法的是( )。
-
有以下程序:#include <stdio.h> main() { char ch='Z'; ch=(ch-'A'+1)%26+'A'; putchar(ch); }程序的运行结果是( )。
-
有以下程序:#include <stdio.h> #define M 5 #define f(x,y)x*y+M main() { int k; k=f(2,3)*f(2,3); printf("%d\n",k); }程序的运行结果是( )。
-
在C语言程序中,下列说法正确的是( )。
-
有以下程序:#include <stdio.h> #include <string.h> typedef struct { char name[9]; char sex; float score[2]; } STU; void f(STU *A) { strcpy(a->name,"Zhao"); a->sex='m'; a->score[1]=90.0; }main() { STU c={"Qian",'f',95.0,92.0}, *d=&c; f(d); printf("%s,%c,%2.0f,%2.0f\n", d->name, c.sex, c.score[0], c.score[1]); }程序的运行结果是( )。