选择题
有以下程序
#include<stdio.h>
struct ord
{ int x,y;}dt[2]={1,2,3,4];
main()
{
struct ord*p=dt;
printf('%d,',++(p->x));
printf('%d\n',++(p->y));
}
程序运行后的输出结果是______。
A、
2,3
B、
4,1
C、
3,4
D、
1,2
【正确答案】
A
【答案解析】
p->x为1, p->y值为2,前置自增表达式分别为2,3,所以选择A。
提交答案
关闭