 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can print reverse of 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 Tech MS which is available on Google Play. Now coming on to the topic, here in this video I will be implementing a C program which will print reverse of array and array will be passed into a function. So first I am including a header file stdio.h can main function. Before main, I am going to declare a function reverse and its return type is void and it will receive an argument that is integer array. So this is function declaration. Inside main, I am declaring an array and a variable i then with the help of printf I am going to display a message enter elements then for loop which will repeat 10 times and it will read all the elements entered by the user and all the elements will be stored inside a array. At different indexes, indexes will be provided through variable i. After reading operation, I am calling reverse function. Inside reverse function, I am passing array a. So this statement is function calling. This is complete definition of main. After defining main function, I am going to define reverse function definition. This will be function definition. Here I am declaring a variable i then I am going to print a message through printf reverse of array then for loop. With the help of this for loop, I am going to repeat printf statement 10 times which will display elements which are available inside array. So if I use this loop from 0 to less than 10 then array elements will be printed in the order which I have which user will be providing at the time of input. So to print it in reverse order, I have to initialize i with 9 and condition will be i greater than 0 and then i minus minus. So this way I can print the array elements in reverse order. Now I am executing this code. You can see it is asking for elements. I am entering 10 numbers and you can see all the elements are printed in reverse order. So this way with the help of this reverse function, I am able to display the array in reverse order. Now the second method is I am starting loop from 0 and it will repeat 10 times through this condition i less than 10 and increment is i plus plus. Now here I am using 9 minus i. So by starting loop from 0, I can also print reverse of array using this 9 minus i inside subscript of a. So first time i is 0 so it will print a of 9 because i is 0 so 9 minus 0 is 9. Then i plus plus i will become 1. So 9 minus 1 is 8. So a 8 index value will be displayed on console and so on. So this way reverse of array will also be displayed on console. So again I am entering 10 numbers. You can see reverse of array is displayed on console through this logic also. So these are two different methods through which you can print reverse of array and I have implemented this code with the help of functions in C programming. So friends, if you want to process any array using function that you can apply this method, I hope you have understood how you can process array elements with the help of user defined functions. If you want to watch more programming related videos, you can follow my YouTube URL that is youtube.com slash sanjaygupta underscore tech school. You can download my programming app TechMS which is available on Google Play. Thank you for watching this video.