单选题
有以下程序:
#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));
}
程序运行后的输出结果是______。
【正确答案】
D
【答案解析】[解析] p->x的值为1,++(p->x)作用是取p->x的值加1作为表达式的值即值为2,同理++(p->y)的值为3。所以选D。