#include<stdio.h>
struct Student{
int id;
char name[100];
int age;
};
void ShowStudent(struct Student s)
{
printf("id:%d\nname:%s\nage:%d\n",s.id,s.name,s.age);
}
int main()
{
struct Student s1={2023122999,"zhangsan",18};
ShowStudent(s1);
return 0;
}
结构体作为函数参数--传值
最新推荐文章于 2024-08-18 21:36:31 发布