标题:大家来看看啊,struct的问题
取消只看楼主
new_hand
Rank: 1
等 级:新手上路
帖 子:15
专家分:3
注 册:2009-6-25
结帖率:100%
 问题点数:0 回复次数:0 
大家来看看啊,struct的问题
看下列程序段,回答:
 #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,",++p->y);  //好像换成++p->x一样
}
输出什么呢?
是2,3,

本人主要不明白
为什么是2,3呢?而不是2,4,呢?


[ 本帖最后由 new_hand 于 2009-9-17 20:18 编辑 ]
搜索更多相关主题的帖子: struct 
2009-09-17 20:04



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-286054-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.040002 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved