下列程序输出结果是( )。
#include
main
{ char a[]={'a','b','C','d','e','f','\0');
int i,j;
i=sizeof(a);
j=strlen(a);
printf("%d,%d",i,j); }
A.7,7
B.7,6
C.6,6
D.6,7
第1题:
下列程序的输出结果是( )。 #include<stdio.h> main( ) { int i,S=0; for(i=1;i<10;i++) if(!(i%2)&&!(i%3))s+=i; printf("%d\n",s); }
A.4
B.39
C.45
D.6
第2题:
下列程序的输出结果是______。 union un { int a[3]; long b; char c[6]; }un1,*p; main() {p=&un1; p->a[0]=0x37; p->a[1]=0x38; p->a[2]=0x39; printf("%c\n",p->c[4]); }
A.39
B.9
C.38
D.8
第3题:
(39)有以下程序
#include <stdio.h>
main()
{ unsigned char a=8,c;
c=a>>3;
printf("%d\n",c);
}
程序运行后的输出结果是
A)32
B)16
C)1
D)0
第4题:
下列程序的输出结果是______。#include <stdio.h>main(){ union { int k; char i[2]; } *S,a; s=&a; s->i[0]=0x39; s->i[1]=0x38; printf("%x\n",s->k);}
A.3839
B.3938
C.380039
D.390038
第5题:
表达式 Writeln(‘This is ‘#39’xxx#39string’)的结果是:( )。
A.This is xxx sstring
B.this is ‘xxx#39string
C.This is ‘’’xxx’string
D.This is ‘xxx’string
第6题:
39、以下语句的输出结果是: print("hello",end='+') print("world")
A.hello+world
B.hello+ world
C.hello world
D.hello+ world+