关于结构作为函数参数的问题

这里有一个结构:
struct students{
char a[3];
int math;
int computer;
};
在定义结构变量的时候是struct students student[3];
但是当定义函数,结构作为函数参数的时候是 function(students student[],int N){}
相比之下,类型名少了关键字struct
这个是问什么呢?求指导。

结构体作为函数参数时,使用struct structA paramName声明该结构体参数,其中paramName为参数名。前面要用关键字声明的,或者用typedef struct structA就不用声明了。。

"struct students{...}"中的struct是关键字,它告诉编译器,后面开始了一个结构的定义。结构是一种自定义类型,对于每种自定义类型,必须为其起一个名字。本例中“students”就是这种类型的名字。
结构定义完之后,它就等于于int、char等类型,可以用于声明变量或数组。在函数定义“ function(students student[],int N){}”中,函数的第一个参数名称为“student”,类型为“students []”。这时“students”的前面不需要再加关键字struct。
记住:在定义一种自定义类型时,需要使用关键字struct等,在使用自定义的类型定义变量时,不需要关键字struct等。

struct students{
char a[3];
int math;
int computer;
};
students student[]
这是c++的写法,c99也是支持的,你的书上带struct是早期c语言的写法。

C语言里结构体作为参数应该需要将参数定义为结构体指针变量

c++ 标准中不需要写struct