struct 是结构体的关键字,用来声明结构体变量; typedef 是用来定义新的类型名来代替已有的类型名,typedef struct 可以理解为 typdef (struct TypeName) NewTypeName。
struct 声明结构体详解:
struct Student
{
char name[20];
int s_ID;
}stud;
#Student是一个结构体类型,可用来定义结构体变量,而stud为结构体变量,可直接调用
typedef struct 声明结构体详解:
typedef struct Student