哪错了求大神看下

cfreshman11 cfreshman11 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
#include <stdio.h>
#include <string.h>
struct xxx
{
char aa[30];
int bb[2];
double cc;
};
struct yyy
{
char dd[50];
struct xxx mm;
char *ee;
char *ff[3];
};
main (void)
{
struct xxx qq={{"sample"},{0,1},{5.4}};
struct yyy nn={{"string constant"},{{"text"},{7,8},{12.3}},{"address"}},{"a","b","c"}};
struct yyy pp,rr;
strcpy(pp.mm.aa,"in structure");
strcpy(pp.dd,"structure");
pp.mm.bb[0]=10;
pp.mm.bb[1]=12;
pp.mm.cc=57.8;
pp.ee="pointer and";
pp.ff[0]="array";
pp.ff[1]="of";
pp.ff[2]="ponter.";
rr=pp;
printf("%s%s %d %d %1f\n%s%s%s%s\n",rr.dd,rr.mm.aa,rr.mm.bb[0],rr.mm.bb[1],rr.mm,rr.ee,rr.ff[0],rr.ff[2]);
}
...全文
评论 2
收藏 已收藏
分享
返回顶部
cfreshman11
C语言 70,040 成员 243,237 内容