Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
You can initialize the value of the elements in an array when you declare that array by enclosing the initialization values in curly braces:
#include <stdio.h>
int main()
{
int scores[5] = {92 , 73 , 57 , 98 ,
89 };
printf(
"The array is %i elements long.",
sizeof(scores) / sizeof(int));
return 0;
}