计算机二级C语言程序设计
免费题库
若有定义int a=0x123abc,b=0123;用语句printf("%#X%#o",a,b);输出,以下正确的输出结果是______。
下面程序#include#includemain(){ char *p1="abc",*p2="ABC",str[50]="xyz";strcpy(str+2,strcat(p1,p2));printf("%s\n",str);}的输出是______。
若有定义:int a=0,b=0,c=0,d=0; ,有C语言表达式 (a++ && b++) ? c++ : d++,以下关于其执行顺序的叙述正确是______。
有以下函数 char *fun(char *p){return p;}该函数的返回值是______。
已有定义:int x=3,y=4,z=5;,则表达式!(x+y)+z-1&&y+z/2的值是______。
以下合法的赋值语句是______。
设有定义#include #include typedef struct { int x, y; } T;typedef struct{ int x, y; } *USER;USER fun(){ USER p;p=(USER)malloc(sizeof(T));p->x=1;p->y=2;return p;}函数fun返回值的类型是______。
有以下程序main(){ int k=5;while(--k) printf("%d",k-=3);printf("\n");}执行后的输出结果是______。
有以下程序#include main(){ char a[30],b[30];scanf("%s",a);gets(b);printf("%s\n%s\n",a,b);}程序运行时若输入:how are you? I am fine则输出结果是______。
有以下程序#include main(){ int i,j = 0; char a[] = "How are you!", b[10] = {0};for (i=0; a[i]; i++)if (a[i] == '' '')b[j++] = a[i-1];printf("%s\n", b);}程序运行后的输出结果是______。
«
1
2
...
34
35
36
37
38
39
40
...
42
43
»