 Hello friends. I'm Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. In this video, I'm going to explain how you can store some of two 1D arrays into third 1D array. So I will be implementing this solution in C programming so that you can understand how we can solve this problem with the help of C programming. Before start, I want to just tell you one update. So if you go to detail or description of this video, you can find links of various players related to C programming. So you can follow them as well. So now I'm going to write a program that is related to C. So you will see how we can add two 1D arrays and how we can store their sum into third. So let's say if I drop 1, 2, 3, 4, 5, 6, 7, 8. So this is first 1D array whose name will be A. This is second 1D array whose name will be B. And we need to add their elements and we need to store them into third array. So let's say this is third array and its name is C. And for each array, we will be having indexes. So 0, 1, 2, 3, 4, 5, 6, 7, 8. So I'm taking similar size for all three arrays so that we can add corresponding value. So let's say this array is having these values. This is having these values. So first array is having 11 to 20 and second is having 1 to 10. So now how would we need to add? First we need to add these two numbers and we need to store it here. Then we need to add value N2. So 14 will be stored here. So this way corresponding indexes will be added for A and B arrays and the sum will be stored into third array. And as an output, we need to print this third array on output C. So now I'm going to write a program for this. So first I'm going to declare three 1D arrays A, B, C and 1 variable I so that I can iterate loop with that for this variable. Now I'm going to write a printer statement which will say enter 10 numbers. Now to read first 10 numbers for first 1D array, I'm going to repeat a loop which will repeat 10 times. And this will read all 10 numbers with the help of this scanner. So these three statements will be reading 10 numbers and all those 10 different numbers will be stored inside this array A. Now to read second array, again I'm going to write printf. So this will also print enter 10 numbers. Then I'm iterating a loop again. So you can see I'm using same variable for loop repetition because after completion of this loop, this will start. So I can reuse the variable that I used in first loop. So this time scanner will read 10 numbers and those will be stored inside array B. So this way these three statements will be reading 10 numbers and those 10 numbers will be stored inside B array. Now I'm going to write third loop that will be adding elements of A and B putting those addition into C and simultaneously it will be printing that result on output C. So I'm printing a statement third array, right? So this message will be printed on the output screen. Then again I'm repeating a loop. Now inside this loop, I need to write the statements for addition C of i equals to A of i plus B of i. So these two arrays are added and the results are stored inside C array. And after this, I can write printf maxLash n or send D and C of i. So the addition will be immediately printed on output C. So this way this is implemented. Now let's understand this. So let's say value of i is 0. So this will be A0 plus B0. So C value of A0 is 11 and value of B0 is 1. So 11 plus 1 will be 12. That will be stored in C0 position. So C0 position is this. So it will be having 12 and then 12 will be printed on output C. Then i plus plus will be taking this. So I will be 1. Next time A1 will be added with B1 and the result will be stored in C1 position. So this way with same i variable, we are able to access same indexes of different 1D arrays. And this printer is printing the addition that is stored in C variable or you can say Cn. So this way this loop will be 10 times all 10 indexes of A and B are added stored inside C and printed on output C. So this way I hope you understood how we can store some of the 1D arrays into card array. And how we can print those some that is available in third 1D array on output screen. So you can implement this program on your laptop so that you can see whether it is working correctly or not. And if you want to watch more programming related videos, so you can go to playlist on my channel or you can go to the description of this video where you will find various links of playlist related to C programming. So do watch them and I hope you understood whatever I explained in this video. Thank you for watching this video.