arrays learning objective in this we will discuss arrays an array is user-defined data type that stores related information together all the information stored in an array belongs to the same data type soin this we will learn how arrays are defineddeclaredinitializedand accessed we will also discuss the different operations that can be performed on array elements and the different types of arrays such as two-dimensional arraysmulti-dimensional arraysand sparse matrices introduction we will explain the concept of arrays using an analogy consider situation in which we have students in class and we have been asked to write program that reads and prints the marks of all the students in this programwe will need integer variables with different namesas shown in fig now to read the values of these variableswe must have read statements similarlyto print the value of these variableswe need write statements if it is just matter of variablesthen it might be acceptable for the user to follow this approach but would it be possible to follow this approach if we have to read and print the marks of studentsin the entire course (say studentsin the entire college (say studentsin the entire university (say , studentsthe answer is nodefinitely notto process large amount of datawe need data structure known as array