 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can copy reverse of array into another array by passing array into function. 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 Techimiz which is available on Google Play. Now coming on to the topic, in this video I am going to demonstrate you how you can copy reverse of array into another array and I am going to pass arrays into functions. So first I am including a header file that is STDI dot H then a function I am going to declare name of function is reverse and I am passing two arguments inside this function and both are integer arrays. So this is function declaration. Now inside main I am declaring two arrays a and b then printf statement will display the message enter elements. To receive elements I am implementing a for loop which will repeat 10 times and it will receive the elements inside a array at different indexes. So with the help of this for loop and scanf elements of a array will be received from the user. Now I have to call reverse function and I am passing both arrays a and b inside this function. So this statement is function call. After completion of function calling, I can print the reverse of array. So this message will be displayed on console using printf and then I am implementing for loop which will display the elements available inside b array. So a and b both will be passed inside the function definition. Now here you have to remember that whenever we modify any array into a particular function the actual array will be modified automatically. So here these a and b are actual arrays which will be passed inside a definition. So now I am implementing the definition void reverse int a and int b. So this is function definition. Here you can see at the time of function call I am passing a and b and both the arrays are received through a and b in function definition. So now in function definition I will be modifying b array. So actual b will be modified automatically so that it's reverse will be displayed on console using these four and printf statements. So here I am implementing a loop which will repeat 10 times. So here I am using two variables i is started from 0 and j is started from 9. Condition is less than 10 because I have to copy 10 elements. So I am repeating this loop 10 times then i is incremented by 1 and j is decremented by 1. Inside this loop I have to assign elements inside b with the help of a. So I have to assign elements of a into b. So here with b I am using j and with a I am using i. So a i is 0. So a is 0 index value will be assigned into b j. j is representing 9. So b 9th index will be receiving value of a 0. So in short you can say first element of a array is assigned into last location of b array then i plus plus and j minus minus will be performed. So second element of a array will be assigned into second last position of b array. So this way a array will be copied into b in reverse order and after completion of this reverse definition this actual b will be modified automatically. This is the benefit of array. So whenever we pass array into function it is passed by call by reference. So whenever you modify any array inside its definition the actual array which is available at function call will be modified automatically. So now I am going to execute this code. Before that I am writing return 0 in main. Now I am executing this code. You can see it is asking for 10 numbers. I have entered 10 elements and you can see the reverse. Reverse of array which I have entered is displayed here. So I hope you have understood the code how it is working and you can see I have read and I have print both the arrays in main function and reverse is done in definition of reverse function. So again you have to remember that whenever we pass any array into a function definition and we modify that array then actual array will be modified automatically. So this is the benefit of using array with the help of function. So I hope you have understood how we can pass multiple or two arrays into function definition. If you want to watch more programming related videos you can follow or subscribe my YouTube channel through the URL youtube.com slash sanjaygupta underscore tech school. You can download my programming app tech image which is available on google play. Thank you for watching this video.