 Hello friends. I am Sanjay Gupta. In this video, I am going to demonstrate you how you can perform linear search operation on array through pointers. Before starting, you can note my information. You can follow or subscribe my YouTube channel through the URL youtube.com slash Sanjay Gupta underscore tech school. You can download my programming app TechMS which is available on Google Play. Now I am going to implement a program with the help of C programming so that you can understand how we can perform linear search operation with the help of pointers on arrays. So first of all, I am including a header file that is a studio dot h. Then I am defining main function inside main function. I am declaring an array, then variable n, then a pointer p, variable i and then f variable which I am initializing with zero value. Now to receive elements from user, I am using printf statement that will show the message enter 10 elements. This message will be displayed on console. Now I am applying for loop which will receive the elements from user. So all the entered elements will be assigned into a array. Now again, I am implementing a printf statement which will display message enter the number you want to search and that number will be received through this scan of statement and the number will be assigned into n variable. So this way all the 10 elements are assigned into a array and the number which I want to search is assigned into n. Now the searching process will be take place with the help of pointers. So now I am assigning address of array into p pointer. So here you can note that name of array provides base address of array. So I am just assigning name of array. So it will automatically assign the base address into the pointer p. Now I can apply searching operation. So for that purpose I am implementing a for loop. Now inside if I am applying asterisk p double equals to n. So if asterisk p is equals to n, asterisk p is representing value of array. So if value of array is equals to n, then I can change the value of f from 0 to 1. So it is indicating that this if condition is true. So if only this condition is true, then only f will be containing 1. Otherwise it will be containing 0. So after matching this condition, I can break the loop because number is found inside the array. If this condition is false, then I have to increase the pointer so that I can point to the next location of array. So this process will repeat 10 times. If this if condition which is available at line number 17 is true, f will become 1 and loop will be terminated. Otherwise loop will be repeating 10 times and p++ will be performed every time when this loop will be repeating. After completion of this loop, I have to check the value of f. So if f is 1, then I can print number is found. Else I can print number is not found. So this way I have implemented the program with the help of pointer. So here in the searching process, instead of using array, I have used its addresses with the help of pointers. So I hope you have understood how I have implemented this logic in front of you. Now I am going to execute this program. So you can see it is asking for 10 numbers. I am entering 10 different numbers. Now it is asking for the number which I want to search. So I am entering 5. You can see the output. It is showing number is found. So the program is working properly. Again I am executing this code. I am first entering 10 numbers. Now I have to enter the number which I want to search. So this time I am entering 15. You can see the output. It is showing number is not found. So the program is working correctly in both the ways whether the number is available or it is not available. So this way I have implemented linear search on arrays through pointers with the help of C programming. I hope you have understood whatever I have demonstrated you in this video. If you want to watch more programming related videos, you can follow or subscribe my YouTube channel through the URL youtube.com. You can also download my programming app TechMS which is available on Google Play. Thank you for watching this video.