#include <stdio.h> struct Person { char name[10]; char character[20]; int age; }; void display(struct Person t); int main() { struct Person man = {"jerry", "fastidious", 45}; //初始化结构变量 display(man); return 0; } void display(struct Person t) { printf("My name is %s, I‘m %d years old. And my friends always complain I‘m so %s.\n", t.name, t.age, t.character); }
原文:https://www.cnblogs.com/profesor/p/13045760.html