正在加载图片...
对外部结构数组或静态结构数组可以作初始化赋值,例 如 struct stu Int num char name char sex; float score °}boy[5]= 101, LI ping","M",45}, (102, Zhang ping", M, 62.5, {103," He fang","F",92.5}, (104, Cheng ling", F,87) {105, Wang ming","M"258}; 当对全部元素作初始化赋值时,也可不给出数组长度• 对外部结构数组或静态结构数组可以作初始化赋值,例 如: • struct stu • { • int num; • char *name; • char sex; • float score; • }boy[5]={ • {101,"Li ping","M",45}, • {102,"Zhang ping","M",62.5}, • {103,"He fang","F",92.5}, • {104,"Cheng ling","F",87}, • {105,"Wang ming","M",58}; • } • 当对全部元素作初始化赋值时,也可不给出数组长度
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有