结构体数组的初始化

结构体数组的初始化

struct student 
{
    int num;
    char name[20];
    char sex;
    int age;
};
struct student stu[]={{100,"WangLin",'M',20},
                      {101,"LiGang",'M',19},
                      {103,"LiYuan",'F',19}
                      };

你可能感兴趣的:(结构体数组的初始化)