What type should be defined for the return value of structural function returned by C language?

It is wrong of you to do so. The student is in the stack area, so you can't receive it with another structure, because there is no structure outside, so

First, we must define the structure tagStudent {...} as global.

Pointer parameters should be used for standard C.

Void foo (structural marker student * output)

It is also unreasonable that the return value is a pointer, because the caller does not know whether this return is to allocate memory or point to a global variable. In one case, a global variable can be considered as a return value declared as const struct tagStudent *

It is reasonable for c++ to use reference parameters.

void foo(struct tag student & amp; Output)

It is not impossible to return the structure, but it may cause a large memory copy. If this structure is large, there will be a big copying process when you receive it with the structure, which is unnecessary in itself. You can pass it in with a pointer parameter and handle it with the same memory address.