【发布时间】:2012-10-26 09:48:51
【问题描述】:
我有一个关于在 C 中初始化静态变量的问题。我知道如果我们声明一个默认值为0 的全局静态变量。例如:
static int a; //although we do not initialize it, the value of a is 0
但是下面的数据结构呢:
typedef struct
{
int a;
int b;
int c;
} Hello;
static Hello hello[3];
hello[0]、hello[1]、hello[2]的每个结构中的所有成员是否都初始化为0?
【问题讨论】:
标签: c static struct initialization