下面程序段的运行结果是()。char a[7]=“abcdef”; char b[4]=“ABC”; strcpy(a,b); printf(“%c”,a[5])
A.空格
B.\0
C.e
D.f
A.空格
B.\0
C.e
D.f
第1题
下面程序段的运行结果是______。 main() { char a=2,b=3,c=5,d,e; d=a-b|c; e=a-b||c; printf("%d,%d",d,e); }
第3题
以下程序段的运行结果是______。 main() { char a=2,b=5; if(a&b)printf("YES"); else printf("NO"); }
第4题
下列程序段的运行结果是______。 char str[]="ABCD",*p=str; printf("%d\n",*(p+3));
第5题
下列程序段的运行结果是______。 char str口="ABCD",*p=str; printf("%d\n",*(p+3));
第6题
A.PROgram
B.PROGRAM
C.PRO
D.proGRAM
第7题
下面程序的运行结果是______。
typedef union student
{char name[10];
long sno;
char sex;
float score[4];
}STU;
main()
{ STU a[5];
printf("%d\n",sizeof(a));
}
第8题
A.输出空格
B.\0
C.e
D.f
第9题
A.正数
B. 负数
C. 零
D. 不确定的值
第10题
下面程序的运行结果是【 】。 include<stdio.h> define SIZE 12 main() { char s[SIZE]; int I;for(I=0;I<SIZE;I++) s[I]=′A′+I+321; sub(s,7,SIZE-1); for(I=0;I<SIZE;I++) printf("%c",s[I]); printf("\n");} sub(char*a,int t1,int t2) { char ch; while (t1<t2) { ch=*(a+t1); *(a+t1)=*(a+t2); *(a+t2)=ch; t1++;t2--; } }
第11题
下面程序的运行结果是【 】。 include<stdio.h> define SIZE 12 main() { char s[SIZE];int i;for(i=0;i<SIZE;i++) s[i]=A+i+321; sub(s,7,SIZE-1); for(i=0;i<SIZE;i++) printf("%c",s[i]); printf("\n");} sub(char *a,int t1,int t2) { char ch; while(t1<t1) { ch=*(a+t1); *(a+t1)=*(a+t2); *(a+t2)=ch; t1++;t2--;} }