 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can print reverse of a string. Before starting, you can note my information. You can follow or subscribe my YouTube channel through the URL youtube.com slash sanjaygupta underscore tax school. You can download my programming app, Techimus, which is available on Google Play. Now coming on to the topic, here I am going to implement a code in C which will print reverse of a string. So first I am including a header file that is stdio.h Then I am defining main function. Inside main function, I am declaring a string variable str. Its data type is character and its size is 10. Now I am declaring two variables i and c. Then printf which will display the message, enter a string on console and through getters, I am going to receive content of string from user. Now I am implementing a loop. You can see here I have initialized a loop from zero i is zero and then condition is str of i not equals to null. So if string content is not equals to null, then only loop will be repeated. Otherwise it will be terminated and then i++. With this loop, I am counting value of c. So this loop will be counting number of characters string. So after counting the number of characters, I am implementing another loop where I am initializing i with c-1. So c will be counting total number of characters and index starts from zero. That's why for last index, I am applying c-1 and I am initializing it into i. Then if i is greater than equals to zero, then this loop will repeat and i-minus. Now I am going to print content of str string character by character. And after this loop, I am applying return zero. So this loop will print string in reverse order. So with this loop, with second loop, content of string will be printed in reverse order on console. So we can also display a message string reverse. Now I am going to execute this code. So here, sorry, again I am executing this code. Here I am entering my name Sanjay. You can see the output. My name is printed in reverse order. So you can see program is working properly. Here the code is divided into two parts. First is counting number of characters in a string and then second loop is printing the content of string in reverse order. So I hope you have understood how we can print reverse of string in c programming. 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 Techimus which is available on Google Play. Thank you for watching this video.