Initializing Arrays
Explore how to define and initialize arrays in C programming. Understand various initialization methods, including direct assignment, zero initialization using static keyword, and input from the console. Learn how array elements can be manipulated in arithmetic expressions and the rules for specifying array size during definition and initialization.
Defining and initializing arrays in one step
Like a normal variable, an array can also be defined and initialized at the same place. The values being initialized should be written in a pair of { }. When an array is defined and initialized at the same place, mentioning its size is optional.
dataType arrayName[size] = {value1, ...