- 9
- 0
- 约1.19千字
- 约 45页
- 2024-04-02 发布于广西
- 举报
C/C++语言程序设计;第十一章
结构体与共用体
;主要内容;三个定义;结构体定义;结构体类型;请写出以下程序的运行结果;三个定义的区别;结构体类型变量的定义1;结构体类型变量的定义;结构体变量的类型及其静态初始化;结构体类型变量成员的访问1;结构体类型变量成员的访问2;结构体类型变量成员的访问3;结构体根本变量的动态初始化;结构体数组变量的动态初始化;结构体指针变量的动态初始化;结构体类型的嵌套;structdate
{ intmonth;
intday;
intyear;
};
structstudent
{ intnum; charname[20];
charsex; intage;
structdatebirthday;
charaddr[30];
}student1,student2;;structdate
{ intmonth;
intday;
intyear;
};
structstudent
{ intnum; charname[20];
charsex; intage;
structdate*p;
charaddr[30];
}student1,student2;;结构体嵌套的引用;main()
{structdat
原创力文档

文档评论(0)