 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can print even numbers in reverse order as well as odd numbers in reverse order using recursion in C. Before starting, you can subscribe my YouTube channel by clicking on the link which is available at bottom right corner of this video. You can download my app Techimace available on Google Play. You can connect with me by following these details. You can see a code which is available in front of you. Its first statement is a comment which is showing print even and odd numbers in reverse order using recursion in C. Then I have included a header file stdi.h. Then a function is declared void reverse int. Name is reverse. It will receive an integer as input and its return type is void. Then main main function is containing two variables and an s. Then using printf and scanf, I am going to receive a number. That number will be entered inside n variable using scanf. Then reverse function is called and n is passed as an argument in this function. Then return zero is written because main function's return type is integer. That's why I have used return zero. After complete definition of main function, another function is defined which is reverse. This function is known as function definition. Inside this function definition, I have called this function here. That's why it is known as recursive function calling. So recursive function are those functions in which function is called inside its definition. So inside reverse definition, I have called reverse function. That's why it is a recursive function. Then with the help of if statement, I have mentioned a base condition. If n is zero, then it will terminate a recursive calling of the function. If it is false, then else part is printing value of n and return statement is calling reverse and passing n minus two. So this recursive calling will call this definition again. Then base condition will be checked. If it is true, then recursive calling will be break. Otherwise, it will continue. Now, first I am executing this code and I am entering 20. So right now it is displaying all the even numbers in reverse order 20, 18, 16, 14, 12, 10, 8, 6, 4 and 2. And it starts from the number which you enter. Now, if you want to display all odd numbers, then you have to change this base condition. Now, base condition is n w equals to minus one. So if it is true, then recursive process will be terminated. Otherwise, all the odd numbers in reverse order will be displayed. Now, if I execute this code, this time I have to enter an odd number. You can see 21, 19, 17, 15, 30, 11, 9, 7, 5, 3, 1. All odd numbers in reverse order are printed. So with the help of this code, you can print all even numbers in reverse order, as well as you can print all odd numbers in reverse order. You just have to change this base condition. In case of odd numbers, this condition is n equals to minus one. In case of even numbers, this condition will be n equals to zero. Rest of the code will remain same for both the series printing. I hope you have understood how you can print even and odd numbers in reverse order using recursion in C. If you want to watch more programming related videos, you can subscribe my YouTube channel. Thank you for watching this video.