 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can search whether a particular character is present in string or not by passing string 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 TechMS which is available on Google Play. Now I am going to implement solution of this problem with the help of C programming. So first I am including a header file stdi.h. Now I am defining, sorry, I am declaring a function that is search whose return type is void. It will receive two arguments. First will character add in and second will be a character variable. So this is function declaration. Now I am defining main function. Inside main function, I am declaring two variables of character type. First is character adding and second one is character variable. Now with the help of printf, I am going to display the message enter string on console. Then get us will read entered content and that will be stored inside str. Now again I am using printf which will display the message enter the character you want to search. I am reading that character using percent using scanf percent C and percent ch. So str is containing the string and ch variable is containing the character which we want to search. Now I am calling search function and inside search function I am passing two arguments str and ch. So this is function call statement. After that I am writing return zero. So this is complete implementation of main. Now I am defining search function. So here first argument will be search and second argument is ch. This is function definition. Inside this function I am declaring a variable i and f which is equals to zero. Now I am implementing for loop which is initialized with zero. Its condition is str of i not equals to null and then i plus plus. So this loop will repeat if this condition is true str of i not equals to null. If this condition is false then do then this loop will be terminated. Now I have to check whether str of i is equals to ch. So if this condition is true it means the character which is available inside ch variable is also available in character sorry in string. So if this condition is true then I can assign one into f and I am terminating the loop using break keyword. So if character is present then only f will become one otherwise it will remain zero. So after completion of this loop I have to check the value of f. If it is equals to one then I can print character is present in string otherwise character is not present in string. So this way I have implemented the search function in front of you which is checking whether the particular character is available in string or not. Now I am going to execute this code. I am entering Sanjay. Now I am going to search the character a. You can see the output character is present in string. So the program is working properly. Now again I am executing this code. Again I have entered Sanjay. This time I want to search m. So you can see the output character is not present in string. So the program is working properly in both the ways whether the character is available or not available. And I have passed character array or you can say string into function. I hope you have understood how I have implemented this code. If you want to watch more programming related videos 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 Techimace which is available on Google Play. Thank you for watching this video.