西农C语言第四次实习作业...docVIP

  • 2
  • 0
  • 约1.55千字
  • 约 4页
  • 2018-05-08 发布于河南
  • 举报
西农C语言第四次实习作业..

LT08-01.c #includestdio.h #includestring.h struct st { char str[5],s[10]; int a; struct { char c;float w;}d; }; void main() { struct st x1,x2; gets(x1.str); gets(x1.s); x1.a=34,x1.d.c=F,x1.d.w=23.5f; x2=x1; printf(%-4s %-5s %3d %c.2f\n,x2.str,x2.s,x2.a,x2.d.c,x2.d.w); } 在void main()中的struct定义的时候,是引用头文件中结构体的规定表格数据吗?在void main()中struct定义的变量除了必须包含结构体外,可以任意定义任何变量吗?且其功能有如同char,int,float等定义关键词的功能吗? struct st x1,x2;这一部分表示什么意思呢,为什么有 st x1这是一个变量还是两个变量呢? BC08-01.c #includestdio.h #includestring.h struct st { char str[5],s[10]; struct { char c;float w;}; }; void main() { struct st x1,x2

文档评论(0)

1亿VIP精品文档

相关文档