单项选择题
有以下程序:
#include<stdio.h>
struct tt
int x;struct tt*y;*p;
struct tt a[4]=20,a+1,15,a+2,30,a+3,17,a
main()
int i;
p=a;
for(i=1;i<=2;i++)printf("%d",p->x);p=P->y;
程序的运行结果是______。
A.20,30,
B.30,17
C.15,30
D.20,15
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有以下程序: #include<string.h> main(int argc,char*argv[]) int i=1,n=0; while(i<argc)n=n+strlen(argv[i]);i++ printf( %d n ,n); 该程序生成的可执行文件名为:proc.exe,若在运行时输入命令行: proc 123 45 67 则该程序的输出结果是______。
A.3
B.5
C.7
D.11
点击查看答案&解析
单项选择题
有以下程序: #include<stdio.h> main() FILE*fp;int a[10]=1,2,3,i,n; fp=fopen( d1.dat , w ); for(i=0;i<3;i++)fprintf(fp, %d ,a[i]); fprintf(fp, n ); fclose(fp); fp=fopen( d1.dat , r ); fscanf(fp, %d ,&n); fclose(fp); printf( %d n ,n); 程序的运行结果是______。
A.12300
B.123
C.1
D.321
点击查看答案&解析
相关试题
有以下程序: main() char*p[]= ...
有以下程序: #include<string.h> vo...
有以下程序: #include<stdio.h> #i...