欢迎来到贱贱的博客

扩大
缩小

c语言typedef运用之结构体

 1 #include <stdio.h>
 2 #include <stdlib.h>
 3 
 4 typedef struct stu
 5 {
 6     char name[10];
 7     int score;
 8 }stu_info;
 9 
10 int main()
11 {
12     stu_info sta = {"lanj",99};
13     printf("sta.name=%s\nsta.score=%d",sta.name,sta.score);
14 
15     
16     system("pause");
17     return 0;
18 }

 

posted on 2016-11-07 15:19  L的存在  阅读(458)  评论(0编辑  收藏  举报

导航