- 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
您可能关注的文档
最近下载
- 高考生物考前必背(共28页).pdf VIP
- 西子奥的斯almcb4 2使用说明书1.pdf VIP
- 人工智能 智能体互联 第2部分:身份码.pdf VIP
- 江西省新余市2024-2025学年七年级下学期期末测试数学试卷(含解析).pdf VIP
- 2025年甘肃省白银市中考数学试卷真题(含标准答案)原卷.pdf
- (完整版)《机械工程测试技术基础》熊诗波课后习题答案.pdf VIP
- 人工智能 智能体互联 第1部分:总体架构.pdf VIP
- 基层医疗卫生机构常见新生儿疾病诊疗专家共识:新生儿呕吐(2025年).pptx VIP
- 人工智能 智能体互联 第3部分:身份管理.pdf VIP
- 西子奥的斯电梯调试资料ALMCB-V3.2.ppt VIP
原创力文档

文档评论(0)