码迷,mamicode.com
首页 > 编程语言 > 详细

C结构体数组赋值

时间:2015-09-15 23:18:10      阅读:219      评论:0      收藏:0      [点我收藏+]

标签:

 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 }

有没有怪怪的感觉 :

技术分享

C结构体数组赋值

标签:

原文地址:http://www.cnblogs.com/liunnis/p/4811633.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!