0,4,5
4,4,5
4,4,4
0,0,0
第1题:
有以下程序:#include <stdio.h>#include <string.h>main( ) { char a[ 7 ] = "a0 \0a0 \0"; int i,j; i = sizeof(a); j = strlen(a); printf(" % d %d \n" ,i,j); }程序运行后的输出结果是( )。
A.22
B.76
C.72
D.62
第2题:
以下程序运行后的输出结果是( )。
include<stdio.h>
main()
{ int x=20;
printf("%d", 0<x<20);
printf("%d\n", 0<x && x<20);
}
第3题:
有以下程序
#include <stdio.h>
main( )
{ int a=0,b=0,c=0;
c=(a=a-5); (a=b, b+=4);
printf(”%d,%d,%d\n”,a,b,c);
}
程序运行后的输出结果是
A) 0,4,5
B) 4,4,5
C) 4,4,4
D) 0,0,0
第4题:
下列程序的输出结果是( )。 #include<stdio.h> main() { int a=4; printf("%d\n",(a+=a-=a*a)); }
A.-8
B.14
C.0
D.-24
第5题:
有以下程序: #include <stdio.h> main( ) { intc = 35; printf( "% d \n" , e&c); } 程序运行后输出结果是( )。
A.0
B.70
C.35
D.1
第6题:
下列程序的输出结果是( )。
#include<stdio.h>
main()
{ int a=4;
printf("%d\n",(a+=a-=a*A) );
}
A.-8
B.14
C.0
D.-24
第7题:
试题18
有以下程序
#include <stdio.h>
main()
{ int a=1,b=0;
if(- -a) b++;
else if(a= =0) b+=2;
else b==3;
printf(“%d\n”, b);
}
程序运行后的输出结果是()
A.0
B.1
C.2
D.3
第8题:
4,4,4
1,4,8
0,0,0
1,2,4
第9题:
X
XYZ
YZ
Y
第10题:
1
10
0
4
第11题:
0,18,3
1,14,3
0,14,3
0,14,6
第12题:
30
40
10
20
第13题:
有以下程序 #include<stdio.h> main() {printf("%d\n",NULL);} 程序运行后的输出结果是
A.0
B.1
C.-1
D.NULL没定义,出错
第14题:
有以下程序 #include <stdio.h> main() { int.i=0,a=0; while(i<20) { for(;;) { if((i%10)==0) break; else i--; } i+=11; a+=i; } printf("%d\n",a) ; } 程序运行后的输出结果是( )
A.21
B.32
C.33
D.11
第15题:
有以下程序: #include<stdio.h> main() {printf("%d\n",NULL)); 程序运行后的输出结果是( )。
A.0
B.1
C.-1
D.NULL没定义,出错
第16题:
有以下程序 #include.<string.h> main() { char *p="abcde\ofghjik\0"; printf("%d\n",strlen(p)); } 程序运行后的输出结果是
A.12
B.15
C.6
D.5
第17题:
有以下程序: #include<string.h> main( ) { char *p="abcde\0ghjik\0"; printf("%d\n",strlen(p) ); } 程序运行后的输出结果是
A.12
B.15
C.6
D.5
第18题:
下列程序的输出结果是( )。#include<stdio.h>main(){ int a=4 printf("%d\n",(a+=a-=a*A) );}
A.-8
B.14
C.0
D.-24
第19题:
-1
0
1
7
第20题:
99
68
60
108
第21题:
-12
9
0
3
第22题:
0
1
2
3
第23题:
0
1
10
4