在C语言中,可以使用以下方法来调用结构体:
通过结构体变量名直接访问结构体成员:
struct Student { int id; char name[20]; int age;};struct Student stu;stu.id = 1;strcpy(stu.name, "John");stu.age = 20;通过指针访问结构体成员:
struct Student { int id; char name[20]; int age;};struct Student stu;struct Student *pStu = &stu;pStu->id = 1;strcpy(pStu->name, "John");pStu->age = 20;通过函数参数传递结构体:
struct Student { int id; char name[20]; int age;};void setStudent(struct Student *stu) { stu->id = 1; strcpy(stu->name, "John"); stu->age = 20;}struct Student stu;setStudent(&stu);上述三种方法都可以用来调用结构体,并对结构体进行赋值或访问成员。

