C语言如何定义和使用结构体

时间:2024-10-14 14:12:02

1、打开啊哈c编译器

C语言如何定义和使用结构体

3、 int a=10;//第一种定义 struct student stul = {98,"李四"}; printf("a=%d\n",a); printf("结构体:score = %d\n",stul.score); printf("结构体:name = %s\n",stul.name);

C语言如何定义和使用结构体

5、运行程序

C语言如何定义和使用结构体
© 2025 长短途
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com