结构体成员数组变量初始化

@2018-10-23

具体代码

 1 #include <stdio.h>
 2 
 3 
 4 
 5 typedef struct _structArray
 6 {
 7     int objI;
 8     char array[10];
 9     float objF;
10 }StructArray_t;
11 
12 
13 
14 int main()
15 {
16     StructArray_t sVar =
17     {
18         objI: 1,
19         array:{1, 2, 3},
20         .objF = 0.99
21     };
22     
23     printf("%d	%f
", sVar.objI, sVar.objF);
24     printf("%d	%d	%d	", *sVar.array, *(sVar.array+1), *(sVar.array+2));
25 }
原文地址:https://www.cnblogs.com/skullboyer/p/9835333.html