- Local Variables
- Formal Parameters
- Static Variables
- Global Variables
- Input Variables
- Extern Variables
- Initialization of Variables
- Visibility Scope and Lifetime of Variables
- Creating and Deleting Objects
Initialization of Variables
Any variable can be initialized during definition. If a variable is not initialized explicitly, the value stored in this variable can be any. Implicit initialization is not used.
Initialization of global and static variables is performed only once. Initialization of local variables is made every time you call the corresponding functions.
List of values of the array elements must be enclosed in curly brackets. Missed initializing sequences are considered equal to 0.
If the size of the initialized array is not specified, it is determined by a compiler, based on the size of the initialization sequence.
For structure type variable partial initialization is allowed, as well as for static arrays (with an implicitly set size). You can initialize one or more first elements of a structure or array, the other elements will be initialized with zeroes in this case.