 Hello friends, I am Sai Gupta. I welcome you on my YouTube channel. You can watch various programming related videos here. My channel contains more than 800 videos. You can search these videos through the keyword programming by Sanjay Gupta. In this video, I am going to demonstrate you how to pass an array using pointer in functions in C programming. So we can pass an array into a function. But in this video, we will learn how we can pass an array using pointer in a function. So for example, I am taking some of elements of array. So this example will be implemented here. First of all, I am going to include a header file stdio.h. Now I am going to declare a function whose name is some, its return type is integer and its argument type is an asterisk. It means it will receive an address and that address will be stored inside a pointer. Now I am going to define main function. Inside main function, I am declaring some variables. Now the message and the elements will be displayed on output screen through this printf. Now I am repeating a loop which will read elements from user and all the elements will be stored inside an array. Now after completion of reading process, I have to call the function. This statement is known as function calling. So I am calling some function passing a array as argument and the returned value will be stored inside s. Now through printf, I am going to display result on output screen with the help of variable s. Now I am going to define some function. So this block will be known as definition. Here you can see I have used a pointer p which will receive base address of array. So at line number 12, I have passed array as an argument. So whenever you pass an array into a function as an argument, then it's base address. Base address means address of a0index automatically passes and that will be stored inside this pointer p. Now I can access all the location of that array with the help of this pointer p. So here I am declaring some variables. I am repeating this loop 10 times. Now inside this loop, I am going to apply addition operation and with the help of this pointer p, instead of this, I am writing this notation. So here you can see I have added i in p pointer. So p pointer is containing base address every time I am adding i into it and through this asterisk sign, I am dereferencing it. So this p pointer will be providing values which are available at different addresses in the array and those values will be added into this s variable. After completion of this loop, I am going to return s. So this is the complete implementation where I am processing array through pointer into a function. Now I am going to execute this code so that you can understand whether it is working properly or not. So it is asking for the elements. I have to enter 10 numbers here. So I am entering 10 times 1 and output should be 10. So you can see it is printing sum equals to 10 as the output. So the program is working properly. I hope you have understood how we can pass array as an argument and how we can process that array through a pointer into a user defined function. If you want to watch more programming related videos, you can follow my YouTube channel. Thank you for watching this video.