正在加载图片...
struct date struct stud st2 t int year int age, year int month i st2.name=“John”; int day i t2. age= 20 struct stud t2. birthday year=1980 i char name[101 st2 birthday. month=11; int age st2 birthday day= 23 struct date birthday st2.s1=89 float s1. s2 t2.s2=95 可以定义与结构体变量 age=24; 成员名相同名字的变量year=2000 它们之间不会发生混乱struct date { int year ; int month ; int day ; } ; struct stud { char name[10] ; int age ; struct date birthday; float s1 , s2 ; } ; struct stud st2 ; int age , year ; st2. name = “John” ; st2. age = 20 ; st2. birthday. year = 1980 ; st2. birthday. month = 11 ; st2. birthday. day = 23 ; st2. s1 = 89 ; st2. s2 = 95 ; age = 24 ; year = 2000 ; 可以定义与结构体变量 成员名相同名字的变量 它们之间不会发生混乱
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有