 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can calculate some of two 1D arrays using pointers. Before starting, you can note my information, you can follow or subscribe my YouTube channel through the URL youtube.com slash sanjaygupta underscore tech school. You can download my programming app Techimus which is available on Google Play. Now I am going to implement a program in C programming which will demonstrate you how you can calculate some of two 1D arrays using pointer. So first I am including a header file that is stdi.h then I am implementing main function inside main function. I am going to declare three 1D arrays then three pointers P1, P2 and P3 and a variable I. So here you can see three 1D arrays ABC and three pointers P1, P2, P3 are declared and a variable I is declared for counting the rotations of loop. Now with the help of printf, I am going to display the message enter 10 elements of first array. Now with the help of for loop, I am going to receive those 10 elements. This for loop will repeat scanf statement and all the elements of first array will be stored inside A. Now to read elements of second 1D array, I am using again the printf statement which will display enter 10 elements of second array. Then for loop will be same and scanf will receive all 10 elements and those elements will be stored inside B. So this way I have received elements of A and B 1D arrays. Now I have to perform the addition of these two arrays with the help of pointer. So I am assigning addresses like this. Here you can see I have assigned base address of A array into P1, B array into P2 and C array into P3. So here you have to remember that name of array provides base address of array. So this way base addresses of these three arrays will be assigned into three different pointers. Now I can easily access the elements which are stored inside these arrays with the help of pointer. So for that purpose I am using this notation. Inside for loop I am going to apply addition operation. So for that purpose I am writing asterisk P3 equals to asterisk P1 plus asterisk P2. So this way elements of A array will be added into B will be added with the B array and the results will be assigned into C array. To move these pointers to further locations I am incrementing first P1 then P2 and then P3. So these pointers will be incremented to the next location which are available inside array. So initially P1, P2, P3 is containing base locations or base addresses. After adding base location P1, P2, P3 are incremented to move to the second location of the array. So this process will repeat 10 times so that all 10 elements of A and B arrays will be added and the result will be assigned into C array. But you can see addition is done with the help of pointers. Now after completion of addition operation I can print the result on console. So with this printf statement the message addition will be displayed. Now I am going to implement a for loop which will display the results of C array on console. At last I am writing return 0. So you can see that at the time of addition operation I have only used pointers. But reading and printing is done with the help of array or you can see variable names A, B and C. So friends this is the solution of the problem which I have mentioned in the first statement of this program. Calculate some of two 1D arrays using pointer. So to read values I have used A and B arrays then I have assigned addresses into pointers. Then addition is done with the help of pointers and then printing is done with the help of array. So now I am going to execute this code. I am entering elements of first 1D array. Now I am entering elements of second 1D array. You can see the output addition is 5. So first 1D array is containing 1 in all locations. Second is containing 4 at all locations. So addition is 5 and addition is printed with the help of C array. So this way I have demonstrated you how you can access the locations of array with the help of pointer and how you can update locations of array through pointer. So A and B are received through P1 and P2 pointers but C array is updated with the help of P3 pointer. So friends if you want to process any array with the help of their addresses then you can prefer pointers in the program. I hope you have understood how I have implemented this program with the help of pointers. If you want to watch more programming related videos you can follow or subscribe my YouTube channel through the URL youtube.com. You can download my programming app TechMS which is available on Google Play. Thank you for watching this video.