 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can pass an array into a function using pointer. 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 demonstrate you how you can pass an array into function with the help of pointer. So first of all, I am including a header file that is a stdio.h. Now I am declaring a function whose name is print. Its return type is void and it will receive an argument that will be an address of a location. So I have declared here integer pointer. So this statement is function declaration. Now I am defining main function inside main function. I am declaring an array and variable I am now with help of print f the masses entered 10 elements will be displayed on console to read this. Sorry to read these 10 elements, I am applying a follow which will repeat 10 times and it will receive 10 elements from the user and all the elements will be stored inside a array. So this is the reading process of array. Now I have to call print function and I am passing name of array inside it. So this statement is function calling. Here you have to remember that the name of array represents base address. So if I am passing an array into a function, then indirectly I am passing its base address to a particular function. So you can say here print function definition will be receiving base address of this array a then return 0. Now I have to define definition of print function. So this block will be known as function definition. So here you can see I have declared a pointer P which will receive address of this array or this array will be passing its base address which will be stored inside P pointer. Now with the help of P pointer I can access all the locations of this array. So I am declaring a variable I now I have implemented follow which will repeat 10 times inside this follow. I am writing a statement print f which will display elements on console with the help of pointer. So here you can see I have used as to this P. So P is containing base address of the array and to print values which are available on that address I have to dereference this pointer. So here asterisk means value at address. So P contains a particular address if I want to print value that is available on that address. I have to use this asterisk sign. Now to move on next location of array I have to apply P plus plus. So this way I have implemented the logic in front of you. So I have passed array into function through its base address then pointer is received that base address and through pointer I am printing all the elements which are available inside array. So now I am executing this code so that you can understand how it is working. So here it is asking for 10 numbers. So I am entering 10 elements. You can see the entered 10 elements are displayed again. So with the help of this loop I have displayed all elements on console. I hope you have understood how you can pass array into a function and that array will be processed with the help of pointer. So this is all about passing array into function using pointer. If you want to watch more programming related videos you can follow or subscribe my YouTube channel the URL youtube.com slash sanjay gupta underscore tech school. You can download my programming app TechMS which is available on Google Play. Thank you for watching this video.