以下程序运行后,输出结果是 define PT 5.5 define S(x) PT*x*x include<stdio.h>
以下程序运行后,输出结果是 define PT 5.5 define S(x) PT*x*x include<stdio.h> main() { int a=1,b=2; printf("%4.1f\n",S(a+b));}
A.49.5
B.9.5
C.22
D.45
以下程序运行后,输出结果是 define PT 5.5 define S(x) PT*x*x include<stdio.h> main() { int a=1,b=2; printf("%4.1f\n",S(a+b));}
A.49.5
B.9.5
C.22
D.45
第1题
若定义define PI 3.14159,则执行完下列程序后输出结果是______。 define PI 3.14159;printf("PI=%P",PI);
第2题
以下程序的输出结果是______。 define TIMES(X) X*X main() { int a=16,k=2,m=1; a/=TIMES (k+m)/TIMES(k+m); printf("d\n",a); }
A.16
B.2
C.9
D.1
第3题
A.9
B.18
C.36
D.6
第4题
以下程序运行后的输出结果是______。 main { inn a=b= c=5: if (c=a+b) printf ("yes\n); else printf ("no\n); }
第5题
有以下程序 main(){ inti=l; i=i^i; printf(%d\n,1);} 程序运行后的输出结果是
A.-1
B.0
C.1
D.7
第6题
以下程序运行后的输出结果是【 】。 include <stdio.h> msin() { int i,n[]={0,0,0,0,0}; for(i=1;i<=4;i++) { n[i]=n[i-1]*2+1; printf("%d",n[i]); } }
第7题
以下程序运行后的输出结果是______。 inClude <strinq.h> char *ss(char *s) { char *p;t; p=S+1;t=*s; while(*p){*(p-1)=*p;p++;} *(p-1)=t; return s; } main() { char *p,str[10]="abcdefgh"; p=ss(str); printf("%s\n",p); }
第8题
下列程序的输出结果是______。 define P(A) printf("%d,",(int)(A) ) definePRINT(A) P(A) ;printf("the end") main() { int i,a=0; for(i=1;i<5;++) PRINT(a+i); printf("\n"); }
第9题
下列程序的输出结果是______。 define LEN 5 int a[LEN],k; main() { fun1(); fun2(); } fun1() { for(k=0;k<LEN;k++) a[k]=k; } fun2() { int k; for(k=0;k<LEN;k++) printf("%d",*(a+k)); }
第10题
下列程序的运行结果是______。 define P(A) printf("%d",A) main() { int j,a[]={1,2,3,4,5,6,7},i=5; for(j=3;j>1;j--) { switch(j) { case 1: case2:P(a[i++]);break; case 3:P(a[--i]); } } }
第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<t2) { ch=*(a+t1); *(a+t1)=*(a+t2); *(a+t2)=ch; t1++;t2--; } }