 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can print reverse of string 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 the solution of this problem with the help of function. So first I am including a header file that is stdio.h. Now I am defining a function, sorry I am declaring a function reverse whose return type is void and it will receive an argument that is character array. So this statement is function declaration. Now I am going to define main function. Inside main I am declaring a character array. Now with the help of printf I am going to display the message enter string. So this message will be displayed on console and get us will read the content of string and all the contents will be stored inside str. Now I am calling reverse function and I am passing string str into it. So this statement is function calling and then return zero. So this is the definition of main function. Now I am defining reverse function definition. So this block is function definition. Inside this block I am declaring a variable i and another variable c equals to zero. Now I am applying a for loop which is initialized with a zero. Then I am checking a condition str of i not equals to null. So if this condition is true then loop will be repeated and here I am counting number of characters. So after completion of this loop c will be counting how many characters are available in this string. So c will be pointing to the last location of the string where a content is available. Now I am going to implement another loop which will display content of string in reverse order. So if string is containing five characters so value of c will be five but according to the index or you can say indexing five location will be sorry if index number five is available then it will be pointing to the sixth location. So for second loop I have to initialize i with c minus one. So c is counted by five but if five characters are available then last character will be available on fourth index. So that's why I have initialized this loop with c minus one. Then condition will be i greater than zero and then i minus minus. Now with the help of this loop I am going to display characters on console. Now this loop will print single single character on console. So string will be printed in reverse order with this loop. Now before execution here I can print a message reverse is equals to. Now I am executing this code. I am entering Sanjay. You can see the output reverse is and Sanjay is printed in reverse order. So friends this way I have implemented the solution of this problem by passing string into function. I hope you have understood how I have implemented this logic. If you want to watch more programming related videos you can follow or subscribe my youtube channel through the URL youtube.com slash sanjaygupta underscore tech school. You can download my programming app Techimage which is available on Google Play. Thank you for watching this video.