9.2结构变量 9.2.1结构变量的定义和初始化 9.2.2结构变量的使用
9.2 结构变量 9.2.1 结构变量的定义和初始化 9.2.2 结构变量的使用
9.2.1结构变量的定义和初始化 三种定义结构变量的方式: 1.单独定义 先定义结构类型,再定义具有这种结构类型的变 量 struct friends_list{ char name[10]; 姓名*/ int age; 年龄*/ char telephone[13]; *联系电话*/ }3; struct friends list friend1,friend2;
9.2.1结构变量的定义和初始化 三种定义结构变量的方式: 1.单独定义 先定义结构类型,再定义具有这种结构类型的变 量 struct friends_list{ char name[10]; /* 姓名 */ int age; /* 年龄 */ char telephone[13]; /* 联系电话 */ }; struct friends_list friend1, friend2;