正在加载图片...
114结构体变量的初始化 struct student struct student i char name[10j; i char name[10li int age int age float scorel. score2 float scorel. score2 }st=“Mary”,21,78,86}; struct student stI 这是初始化,正确st1={“Mary”,2l,78,86}; struct stud i char name[10li 这是赋值,错误 e1, score2."i' struct date birthda C不允许这么做 float score struct stud st2={“John”, 1980,11,23,89,95};11.4 结构体变量的初始化 struct student { char name[10] ; int age ; float score1 , score2 ; } st1={“ Mary”, 21, 78, 86} ; struct stud { char name[10] ; struct date birthday ; float score1 , score2 ; } ; struct stud st2={ “John” , 1980 , 11 , 23 , 89 , 95 } ; struct student { char name[10] ; int age ; float score1 , score2 ; } ; struct student st1; 这是初始化, 正确 st1={“ Mary”, 21, 78, 86} ; 这是赋值, 错误 C不允许这么做
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有