初始化Initialization

“初始值设定项”是要赋给正在声明的变量的一个值或一系列值。An "initializer" is a value or a sequence of values to be assigned to the variable being declared. 通过在变量声明中将初始值设定项应用于声明符,可以将变量设置为初始值。You can set a variable to an initial value by applying an initializer to the declarator in the variable declaration. 初始值设定项的值将赋给变量。The value or values of the initializer are assigned to the variable.

以下各节介绍如何初始化标量聚合字符串类型的变量。The following sections describe how to initialize variables of scalar, aggregate, and string types. “标量类型”包括所有算术类型,还包括指针。"Scalar types" include all the arithmetic types, plus pointers. “聚合类型”包括数组、结构和联合。"Aggregate types" include arrays, structures, and unions.

另请参阅See Also

声明和类型Declarations and Types