以下程序的输出结果为() #include "stdio.h" main( ){int a;for(a=0;a<10;a++);printf("%d",a);}
第1题:
以下程序的输出结果是( )。
include<stdio.h>
fun()
{ int a=0;
a+=3;
printf("%d",A);
}
main()
{ int cc;
for(cc=1;cc<=4;cc++)
fun();
printf("\n");
}
第2题:
以下程序的输出结果是 ( ) # include<stdio.h> main( ) { int a,b; for(a=1,b=1,a<=50;a+ +) { if(b>=10) break; if (b%2==1) { b+=2; continue } b+=2; } printf("%d\n",a); }
A.4
B.5
C.6
D.7
第3题:
以下程序的输出结果是( ) #include<stdio.h> #include<string.h> main() {char str[12]={'s','t','r','i','n','g'}; printf("%d\n",strlen(str)); }
A.6
B.7
C.11
D.12
第4题:
下列程序段的输出结果为( )。
#include<stdio.h>
main()
{ static char a[]="language";
char*p;
p=a;
for(p=a;p<a+8;p+=2)
putchar(*p);
}
A.language
B.lnug
C.有语法错误
D.lang
第5题:
以下程序的输出结果为( )。 #include<stdio.h> main() { char *alpha[6]={"ABCDEFGH","IJKL","MNOP","QRST","UVWX"}; char**p;int i; p=alpha; for(i=0;i<4;i++)printf(" %s" ,p[i]);printf("\n" );}
A.ABCDEFGHIJKL
B.ABCD
C.ABCDEFGHIJKLMNOPQRST
D.AEIM
第6题:
以下程序的输出结果是#include "stdio.h"main(){ int a=065; printf("%d\n",--a);}
第7题:
以下程序的输出结果是【 】。
include<stdio.h>
main()
{ struct stru
{ int a;
float b;
char d[4];
};
printf("%d\n",sizeof(struct stru));
}
第8题:
下面程序段的输出为( )。 #include "stdio.h" main { printf("%d\n",12<<2); }
A.0
B.47
C.48
D.24
第9题:
以下程序的输出结果是______。 #include<stdio.h> main() {printf("%d\n",NULL); }
A.不确定的值
B.0
C.-1
D.1
第10题:
有以下程序: #include <stdio.h> main( ) { intc = 35; printf( "% d \n" , e&c); } 程序运行后输出结果是( )。
A.0
B.70
C.35
D.1
第11题:
有以下程序: #include <stdio.h> #include <string.h> main() { char *p[10]={"abc","aabdfg","dcdbe","abbd","cd"}; printf("%d\n",strlen(p[4])); } 执行后的输出结果是( )。
A.2
B.3
C.4
D.5
第12题:
以下程序的输出结果为() #include "stdio.h" main( ){int a;for(a=0;a<10;a++);printf("%d",a);}
第13题:
以下程序的输出结果是______。
include <stdio.h>
void swap(int *a, int *b)
{ int *t;
}
{ int i=3,j=5,*p=&i,*q=&j;
swap(p,q); printf("%d %d\n",*p,*q);
第14题:
有以下程序
#include <stdio.h>
main( )
{ printf("%d\n",NULL); }
程序运行后的输出结果是
A.0
B.1
C.-1
D.NULL没定义,出错
第15题:
有以下程序: #include<stdio.h> main() { printf("%d\n",NULL);} 程序运行后的输出结果是( )。
A.0
B.1
C.-1
D.NULL没定义,出错
第16题:
下列程序段的输出结果为( )。 #include<stdio.h> main() { static char a[]="language"; char *p; p=a; for(p=a;p<a+8;p+=2) putchar(*p); }
A.language
B.lnug
C.有语法错误
D.lang
第17题:
以下程序的输出结果为______。 #include<stdio.h> main() { int m=7,n=4; float a=20.0,b=10.0,x; x=m/2+n*a/b+1/4; printf("%f\n",x); }
A.11
B.11
C.11.25
D.11.75
第18题:
以下程序运行后的输出结果是( )。
include<stdio.h>
main()
{ int x=20;
printf("%d", 0<x<20);
printf("%d\n", 0<x && x<20);
}
第19题:
有以下程序: #include<stdio.h> main() {printf("%d\n",NULL)); 程序运行后的输出结果是( )。
A.0
B.1
C.-1
D.NULL没定义,出错
第20题:
下列程序的输出结果是( )。 #include<stdio.h> #include<string.h> main() { char a[]="\n123\\"; printf ("%d,%d\n",strlen(a),sizeof(a)); }
A.5,6
B.5,5
C.6,6
D.6,5
第21题:
有以下程序: #include <stdio.h> main( ) { int a=7; while(a--); print[("%d\n",a); } 程序运行后的输出结果是( )。
A.-l
B.0
C.1
D.7
第22题:
下列程序的输出结果是( )。
#include<stdio.h>
main()
{ int a=4;
printf("%d\n",(a+=a-=a*A) );
}
A.-8
B.14
C.0
D.-24
第23题:
以下程序输出结果是 #include <stdio.h> main ( ) { int i=0,a=0; while ( i<2 0 ) { for(;;) { if ((i%10) ==0) break; else i--; } i+=11; a+=i; } print f ( "%d\n" , a); }
A.21
B.32
C.33
D.11
第24题:
以下程序的输出结果为() #include "stdio.h" main( ){int a=010,j=10;printf("%d,%d/n",++a,j--);}