正在加载图片...
结构体变量的一般用法: (1)在定义结构体变量的同时,对结拘体变量初始化 struct struct name2 int num char name 8 float score. } studenti={10,“宋红”,89}; 思考:是否可以写成 student1name=宋红” 相当于 student 1. num=10 strcpy( student l name,“宋红”) student l score=89结构体变量的一般用法: (1) 在定义结构体变量的同时, 对结构体变量初始化 struct struct_name2 { int num; char name[8]; float score; } student1={10, “宋 红”, 89}; 相当于: student1.num=10; strcpy(student1.name, “宋 红”); student1.score=89; 思考:是否可以写成student1.name=“宋 红”;
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有