data structures using initialize the elements during declaration storing values in an array input values for the elements from the keyboard assign values to individual elements figure storing values in an array initializing arrays during declaration the elements of an array can be initialized at the time of declarationjust as any other variable when an array is initializedwe need to provide value for every element in the array arrays are initialized by writingtype array_name[size]={list of values}marks[ marks[ marks[ marks[ marks[ note that the values are written within curly brackets and every value is separated by comma it is compiler error to specify more values than there are elements in the array when we writeint marks[ ]={ }figure initialization of array marks[ an array with the name marks is declared that has enough space to store five elements the first elementthat ismarks[ is assigned value similarlythe second element of the arraythat is marks[ ]is assigned and so on this is shown in fig while initializing the array at the time of declarationthe programmer may omit the size of the array for exampleint marks[]{ }the above statement is absolutely legal herethe compiler will allocate enough space for all the initialized elements note that if the number of values provided is less than the number of elements in the arraythe un-assigned elements are filled with zeros figure shows the initialization of arrays int marks [ { }int marks [ { }int marks [{ }int marks [ }figure initialization of array elements [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ rest of the elements are filled with '