 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you the relation between area and pointers in C programming. 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 Takamis which is available on Google Play. Now I am going to implement the small segment which is written in C programming so that you can understand relation between area and pointers. So first time including a header file that is a stdio.h now I am defining main function inside main first time declaring an array and I am going to initialize it with five different values. Now I am declaring a pointer p and then variable i after that I am assigning address of first index into p pointer. So here you can see I am writing the statement p equals to m percent a zero. So a zero denotes to the zero index of array and m percent will be providing address of that zero th index and the address will be stored inside p pointer. You can also write this statement like this p equals to a. So here you have to remember that whenever you use name of any array it represents base or beginning address of that array that can be stored inside a pointer. So both the statements are same. You can use any particular statement which is beneficial or which is convenient as per your requirement. Now after initializing the pointer I am starting a loop which will repeat five times inside this loop. I am writing a printf statement which will display some values on console. So here percent d then again percent d again percent d and then percent p. Now four variables i a of i asterisk p and then p these four entities will be displayed on console with the help of this pointer. So here you can see so this printf is containing four format specifiers in which three are percent d and one is percent p then i a of i asterisk p and p through these variables four different values will be displayed on console. So i will print zero one two three four five then a of i will be printing values which are available inside array then asterisk p this notation will be printing the value which is available on a particular address and that address will be available inside p and then only p will be displaying the address which is available inside it. Now to increase address every time I am writing p plus plus. So now I have to identify the result of this program so you can see I am executing this code. Now you can see the output and we can compare this output with the printf notation written in front of this output screen. So here you can see first percent is printing value of i so it is zero one two three four so i is started from zero and it is repeating till i less than equals sorry i less than five so i is printing zero one two three four then second percent d is printing value of a i so a i representing various indexes of array so it is printing one two three four five which is the elements of array then asterisk p so first time p is containing address of a zero so it is printing first location value that is one then p is incremented every time whenever this loop will be repeating so one two three four five is printed because of asterisk p and p only p is printing addresses so you can see initial address or base address of this array is uh two two f e three zero then after increment operation that is p plus plus uh addresses incremented by four so it becomes two two f e three four then three eight then three c and then four zero so this way five different different addresses of array is printed in front of you with the help of this p and to print addresses i have used percent p as format specifier so i hope you have understood how we can print locations of arrays with the help of array notation as well as through a pointer so you can see a i and asterisk p both are printing same results on the console so this way if you assign base address of an array into a pointer then you can visit each location of the array through that pointer by incrementing it by one every time so i hope you have understood the relation between array and pointer with the help of this small segment if you want to watch more programming related videos you can follow or subscribe my youtube channel through the url youtube.com slash anjay gupta underscore tech school you can download my programming app techemist which is available on google play thank you for watching this video