标题:这里有什么问题吗??子程序
取消只看楼主
zxrd1989
Rank: 1
等 级:新手上路
帖 子:53
专家分:0
注 册:2011-5-11
结帖率:64.29%
已结贴  问题点数:10 回复次数:2 
这里有什么问题吗??子程序
  struct student
        {
            int num;
            char *name;
            char sex;
            char *major;
            int num;
        }boy[5]={{1,"郑银祥","男","计科",21},
                 {2,"周翔","男","计科",19},
        {3,"大明星","男","软工",20},
        {4,"小广东","男","计科",20},
        {5,"范欣晨","男","计科",20},
        {6,"宫成","男","计科",20}};
        
        
        struct student *ps;
        printf("床号\t姓名\t性别\t专业\t年龄\t\n");
        for(ps=boy;ps<boy+6;ps++)
            printf"%d\t%s\t%s\t%s\t%d\n",ps->num,ps->name,ps->sex,ps->major,ps->num);
搜索更多相关主题的帖子: 子程序 大明星 广东 姓名 欣晨 
2011-05-27 18:49
zxrd1989
Rank: 1
等 级:新手上路
帖 子:53
专家分:0
注 册:2011-5-11
得分:0 
惭愧,这些还没讲,自己看书学的点
2011-05-27 19:11
zxrd1989
Rank: 1
等 级:新手上路
帖 子:53
专家分:0
注 册:2011-5-11
得分:0 
回复 3楼 Toomj
为什么要把要用"M"才行呢?
2011-05-27 19:15



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




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

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