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 }