Arrays in C
Arrays in C
Initializing Arrays:
It is possible to initialize an array during declaration. For example,
The number of values between braces { } cannot be larger than the number of elements
that we declare for the array between square brackets [ ].
You can also initialize an array like this.
Here, we haven't specified the size. However, the compiler knows its size is 5 as we are
initializing it with 5 elements.
Here,
mark[2] is equal to 8
Input and Output Array Elements:
Here's how you can take input from the user and store it in an array element.