There are many way to initialize the array. Don't use the default initialization of array
we can initialize the array using a loop to assigning some value initialize the array explicitly

Suppose :

i// arrays example
#include <iostream>
using namespace std;

int billy [] = {16, 2, 77, 40, 12071};
int n, result=0;

Sponsored Links

int main ()
{

for ( n=0 ; n<5 ; n++ )
{
result += billy[n];
}
cout << result;
return 0;