1. int arr[10] = {1,2,3,4,5,6,7,8,9,10};
arr[0] = 1, arr[9] = 10.
2 int arr[10] = {1,2,3,4,5}
the remaining elements should be filled with '0'.
i.e int arr[10] = {1,2,3,4,5,0,0,0,0,0};
example program :
#include<stdio.h>
main()
{
int arr[10] =
{0};
int i;
for(i=0;i<=9;i++)
printf("%d\n",arr[i]);
}
Op :
0
0
0
0
0
0
0
0
0
0 comments: