单选题:以下程序的输出结果是()。
以下程序的输出结果是()。
struct HAR
{ int x, y; struct HAR * p;} h[2];
int main(void)
{ h[0].x =1; h[0].y =2;
h[1].x = 3; h[1].y=4;
h[0].p=h[1].p=h;
printf(“%d%d\n”, (h[0].p)->x,(h[1].p) ->y);
return 0;
}
A.12
B.23
C.14
D.32
答案:A
struct HAR
{ int x, y; struct HAR * p;} h[2];
int main(void)
{ h[0].x =1; h[0].y =2;
h[1].x = 3; h[1].y=4;
h[0].p=h[1].p=h;
printf(“%d%d\n”, (h[0].p)->x,(h[1].p) ->y);
return 0;
}
A.12
B.23
C.14
D.32
答案:A