inputting values from the keyboard an array can be initialized by inputting values from the keyboard in this methoda while/do-while or for loop is executed to input the value for each element of the array for examplelook at the figure code for inputting each code shown in fig element of the array in the codewe start at the index at and input the value for the first element of the array since the array has elementswe must input values for elements whose index varies from to int imarks[ ]for( ; < ; ++scanf("% "&marks[ ])assigning values to individual elements the third way is to assign values to individual elements of the array by using the assignment operator any value that evaluates to the data type as that of the array can be assigned to the individual array element simple assignment statement can be written as marks[ here is assigned to the fourth element of the array which is specified as marks[ note that we cannot assign one array to another arrayeven int iarr [ ]arr [ ]if the two arrays have the same type and size to copy an arrayarr [ , , , , , , , , , }you must copy the value of every element of the first array into for( ; < ; ++the elements of the second array figure illustrates the code arr [iarr [ ]to copy an array in fig the loop accesses each element of the first array figure code to copy an array at the and simultaneously assigns its value to the corresponding individual element level element of the second array the index value is incremented to access the next element in succession thereforewhen this /fill an array with even numbers code is executedarr [ arr [ ]arr [ arr [ ]arr [ int ,arr[ ]arr [ ]and so on for( = ; < ; ++arr[ii* we can also use loop to assign pattern of values to the array elements for exampleif we want to fill an array with figure code for filling an array with even integers (starting from )then we will write the code as even numbers shown in fig in the codewe assign to each element value equal to twice of its indexwhere the index starts from so after executing this codewe will have arr[ arr[ arr[ and so on operations on arrays there are number of operations that can be preformed on arrays these operations includetraversing an array inserting an element in an array searching an element in an array deleting an element from an array merging two arrays sorting an array in ascending or descending order we will discuss all these operations in detail in this sectionexcept searching and sortingwhich will be discussed in traversing an array traversing an array means accessing each and every element of the array for specific purpose