 to discuss one important topics of C programming that is arrays. We have already seen how data are stored in simple variables. Although storing values in a simple variable is useful, we often need a variable that can store multiple values of same data type. For this we have to use arrays. Today we will learn various operations associated with arrays like how to declare an array, how to define an array, how to store defined values in an array and how to assess values from an array. We will learn different dimensions of arrays in this lecture. Now how to declare an array? For declaring an array we have to first give the data type, then you have to give the name of the array. After that we have to specify the size of the array. Now what is an array? An array is a user defined data type which stores related information together. That means in an array we have to store values of same data type. All the elements stored in an array belong to the same data type. Now let me declare one array of integers. Here I have declared three arrays, one is num, next one is name and third one is average. In the first declaration the array will contain only 10 elements and those elements will be integer type. In the second declaration the array is a character array and it will hold 20 characters. In the third declaration the array name is average and it is a floating type array and it will contain values of numbers those contain decimal points. These are three declaration of array. Now what is the syntax of declaring an array? This is the syntax of declaring an array. First we have to specify the data type, then we have to give the array name, then we have to give the size and after that we have to give this semicolon. For example this declaration statement specifies an integer array which contains maximum 20 elements. Similarly name is a character array which contains maximum 25 characters. These are the two examples of array declaration. Here there are three types while declaring an array. First component is data type. It is a kind of values an array can store for example integer, character, float, etcetera. Then we give the array name that means to identify the name of the array. After that within third bracket we specify the size of the array. That means it gives the maximum number of values that the array can hold. The number within the third bracket indicates the size of the array that is the maximum number of that can be stored in the array. The size of the array is a constant and must have a value at the compilation time. That means if we do not specify the size of the array then it will give a compilation error. For example suppose I have written this integer number like this where I have not specified the size. It will give a compilation error. When we declare and define an array we are just allocating space for the elements. No value are stored in the array. By default the elements of the array are not initialized. They may contain some garbage values. So before using the array you must initialize the array of by reading or initializing some values into the array. Now let me take one example. Suppose I have declared this array. Its name is num and it will contain 10 integer type data. That means suppose this is the array its name is num and there are 10 locations. This is an array and it may contain any number but type integer like this. Suppose I have showed this number in this array and this location is known as num of 0. This location is num of 1. Like this. This location is num of 9. And the first address of this array is known as base address. Now how to access an element from an array. For accessing an individual element of the array the array subscript must be used. For example to access the fifth element of the array integer num 10 we have to write the num of 4. That means to access the fifth element that means this one we have to write like this num of 4. Now I am going to discuss how to initialize an array. For initialization we have to specify the values of the array in the declaration statement. What is let me take some examples. Here integer number I have specified the value size of the value is 5 and there are 5 numbers which are initialized in this array. That means in the first example there will be 1 array like this. There will be 5 locations and for this statement this array will be entered in this array like this. For this I have to specify the size then I have to specify the values of the array separated by some commands. And within the second packet we have to specify the numbers. In the second declaration I have not specified the size but in the I have included 3 values in the initialization statement. And these values will be entered in this array. In the third declaration here I have only input 1 0 in this within this second bracket and it will initialize this 0 in all location of this array num. These are 3 variations of initialization statement. Now let me discuss how to input values through keyboard in an array. To input values for each element of the array loop must be used. We can use any kind of loop like while, do while or for loop. For inputting values in an array through keyboard we have to use values and for this I have written 1 example. Let me explain this example. In this example I have declared 1 array integer num 10 size is 10 and 1 variable i. In the for loop first i is initialized to 0 then i is less than equal to 10 less than 10 then i plus plus. This loop will continue up to i becomes 9. And with the help of a scan of statement I have entered the entered a few numbers in the array num. First in this loop I will be initialized to 0 then 0 less than 10. This condition will be true and as this condition is true the control comes inside the loop and it will enter some value in the location num of 0. After that this i is incremented by 1 that means new value of i is 1. Next again this condition is compared 1 less than equal to 10. 1 less than 10 this is true. So again in the value of num of 1 some value will be entered through the keyboard and like this this loop will continue up till i becomes 9. I will take another example for inputting values in a integer array and then display those values with the help of loops. Let me write the example. Now I will discuss how to enter elements in an array through keyboard and how to display them with the help of loops. For this I have written one example here. First one integer array is declared integer num size is 20 and one variable i is declared for continuing the loop. After that one clear statement is given for clearing the screen then one printed statement is given under the numbers. After that I have used the for loop and loop is initialized i variable is initialized from 0 and it will continue up till i becomes 19. That means i less than 20 and with the help of this scan up statement all the values through the keyboard will be entered in the in the array num. First it will enter the value in the location num of 0 then num of 1 after that it will continue till i becomes 19 that means num of 19. Like this the values in the array will be entered and for displaying the values I have used another for loop and same condition is written here i equal to 0 i less than 20 and here for displaying the values in the array I have used one printed statement to display the output and another printed statement to display the output in a new line that means the output of the program will be like this. Suppose I have entered numbers the output will be like this there will be 20 numbers and it will be displayed like this. This is a very simple program for entering values in an array and displaying those values with the help of loops. Today I have discussed only some simple example of arrays in the next class I will discuss how to declare two dimensional array and how to use two dimensional arrays in C programming. Thank you.