ARRAY INITIALIZATION

1.till the array element are not giving any specific value suppose to contain any garbage value.

2.if the array is initialized where it is declared mentioning the dimension of the array is optional.

Passing array element to the function

#include<stdio.h>

void display(int);

void main()

{

  int marks[6];

  for(int i=0; i<=6; i++){

  printf(“enter the value”);

  scanf(“%d”, &marks[i]);

}

  for( int i=0; i<=6; i++){

  display(marks[i]);

}

}

void display(int i)

{

  printf(“%d”, i);

}