C结构体数组赋值

 1 #include <stdio.h>
 2 #include <stdlib.h>
 3 struct MyStruct
 4 {
 5     int a;
 6     char b;
 7 
 8 };
 9 struct MyStruct hello[]=
10 {1,'a',2,'b'
11 
12 };
13 
14 
15 int main( ){
16     printf("%c",hello[0].b);
17     return(0);
18 
19 }

有没有怪怪的感觉 :

posted @ 2015-09-15 21:58  何似王  阅读(3881)  评论(0编辑  收藏  举报