struct里 成员变量写char num;char name;你scanf里写的是%s 而结构体成员变量里是字符变量不是数组,
char num[20];char name[20];
把第一个地方定义为数组,把二个地方的stu[i].num和stu[i].name前面的&去掉