#include<stdio.h>
#include<string.h>
typedef struct Student
{
int id; //学号
char name[10]; //姓名
int age; //年龄
}Student;
int main()
{
//输入输出
Student fire = { 0 };
//输入
printf("请输入学号、年龄、姓名>");
scanf("%d %d %s", &fire.id, &fire.age, fire.name);
//重新赋值...
fire.id = 0;
fire.age = 22;
strcpy(fire.name, "小斌");
//整体清零
memset(&fire, 0, sizeof(Student));
//整体对结构体赋值
fire = (Student){999,"xiaobin",99 };
printf("请输入学号:%d、年龄:%d、姓名:%s>",fire.id,fire.age,fire.name);
return 0;
}