include<stdio.h>
main()
{ int n[2],i,j;
for(i=0;i<2;i++)n[i]=0;
for(i=0;i<2;i++)
for(j=0;j<2;j++)n[j]=n[i]+1;
printf("%d\n",n[1]);
}
[单选题]以下程序运行后的输出结果是( )。#include<stdio.h>main(){ int i;for (i=1;i<=5;i++)switch(i%5) {case 0:printf("*");break; case 1:printf("#");break; default:printf("/n"); case 2:printf("&"); }}A.&# B.#& C.#& D.& * * & # &*
[主观题]以下程序运行后的输出结果是(7)。include<stdio.h>main(){ int a=37;a%=9;printf("%d\n",a);}
[单选题]以下程序运行后的输出结果是(10)。include<stdio.h>main(){ char a;for(a=0;a<15;a+=5){putchar(a+'A');}printf("\n");}
[主观题]以下程序运行后的输出结果是(9)。include<stdio.h>main(){ int i,n[]={0,0,0,0,0};for(i=1;i<=2;i++){ n[i]=n[i-1]*3+1;printf("%d",n[i]);}printf("\n");}
[主观题]以下程序的输出结果是_[13]_______#include <stdio.h>#include <string.h>char *fun(char *t){ char *p=t;return(p+strlen(t)/2);}main(){ char *str="abcdefgh";str=fun(str);puts(str);}
[试题]以下程序的输出结果是 ( 8 ) 。#include<stdio.h>main(){int i,j,sum;for(i=3;i>=1;i--){sum=0;for(j=1;j<=i;j++) sum+=i*j;}printf("%d/n",sum);}
[试题]以下程序的输出结果是 ( 9 ) 。#include<stdio.h>main(){ int j,a[]={1,3,5,7,9,11,13,15},*p=a+5;for(j=3;j;j--){ switch(j){ case 1:case 2:printf( " %d " ,*p++); break;case 3:printf( " %d " ,*(--p));}}}
[单选题]以下程序的输出结果是#include<stdio.h>main(){int a=15,b=21,m=0;switch(a%3){case 0:m++;break;case 1:m++;switch(b%2){ default:m++;case 0:m++;break; } }printf("%d/n",m);}A.1B.2C.3D.4
[单选题]以下程序的输出结果是( )。#include<stdio.h>void main(){int a,b,d=241; a=d/100%9; b=(-1)&&(-1); printf("%d,%d/n",a,b);}A.6,1 B.2,1 C.6,0 D.2,0
[单选题]以下程序运行后,输出结果是( )。include<stdio.h>define PT 5.5define S(x)PT*x*Xmain{ int a=1,b=2:printf("%4.1f\n",s(a+b));}A.49.5B.9.5C.22.0D.45.0