The indexes of the array are in range : 0..N-1 , where N is the size of the array.
Very common mistake. So, you case resulted in : veryCommonMistake++; (kidding ).
So you need your loop to run from 0 until 99, that is
Code:
for(a = 0 ; a < 100 ; a++)
...
Also, usually we use the variable i to run loops (instead of a), but this of course it's not an error.
I would fill up the array like you, with a for loop (corrected).
However, you can initialize an array in the same line you declare it. Especially useful when you want to set all the elements of it to zero.
Example
Code:
#include <stdio.h>
int main(void)
{
/* No need to write 10 zero'es */
/* They will be initialized to zero
* automatically. */
int array[10] = {0};
/* What are the rest elements of test array? */
int test[10] = {1};
int i;
for(i = 0 ; i < 10 ; i++)
printf("array[%d] = %d\n", i, array[i]);
for(i = 0 ; i < 10 ; i++)
printf("test[%d] = %d\n", i, test[i]);
return 0;
}