单项选择题

以下程序的输出结果是()。
struct HAR
int x,y;struct HAR*p;h[2];
main()
h[0].x=1;h[0].y=2;
h[1].x=3;h[1].y=4;
h[0].p=&h[1];h[1].p->y);
printf("%d%d\n",(h[0].p)->x,(h[1].p)->y);

A. 12
B. 23
C. 14
D. 32

<上一题 目录 下一题>
热门 试题

单项选择题
分析下列程序: #include<stdio.h> main() int*p1,*p2,*p; int a=6,b=9; p1=&a;p2=&b; if(a<b)p=p1;p1=p2;p2=p; printf( %d,%d ,*p1,*p2); printf( %d,%d ,a,b); 程序的输出结果为()。

A. 9,6 6,9
B. 6,9 9,6
C. 6,9 6,9
D. 9,6 9,6

单项选择题
有以下程序#includevoid f(char p[][10],int n) char t[10];int i,j; for(i=0;i<N-1;i++) for(j=i+1;j<N;j++) if(strcmp(p[i],p[j])>0) strcpy(t,p[i]);strcpy(p[i],p[j]);strcpy(p[j],t);main() char p[5][10]= abc , aabdfg , abbd , dedbe , cd ;f(p,5);printf( %d n , strlen(p[0]));程序运行后的输出结果是()。

A. 2
B. 4
C. 6
D. 3

相关试题
  • 下列程序的输出结果是()。 point(char...
  • 若运行时给变量x赋值12,则以下程序的运...
  • 下列的程序用来输出两个字符串前7个字符中...
  • 有以下程序: #include<string.h> ma...
  • 若要求定义具有10个int型元素的一维数组a...