 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can print odd numbers using recursion in C. Before starting, you can subscribe my YouTube channel by clicking on the link which is available at the bottom right corner of this video. You can download my app Techimus that is available on Google Play. You can connect with me by following these details which are available in front of you. Now I am going to explain a quote which is written in front of you. First statement is a comment which is showing objective, print odd numbers up to n, using recursion in C. I have included a header file stdr.h, then display function is declared, its written type is void, and it will receive two integers as in arguments. Then main function, inside main n and i, two variables are declared, i is initialized with 1, then printf will print enter value of n on console, and scanf will read the entered number, and that number will be stored inside n variable. Then display function is called, in this function two arguments are passed, i and n. These arguments will be received inside this definition. Value of i will be available in this i, formal parameter, and n will be available inside this n variable. Then in main function, last statement is written zero, because main function's written type is integer. That's why this statement is available here. Now you can see this function definition which is display function. In this function definition, this function is called, so this function is a recursive function, because definition is calling itself. That's why this function is treated as recursive function. In this function, if and else two blocks are available, this if condition is known as base condition. If this condition is true, that means i equals to n, then value of i will be printed and return will terminate the recursive calling of this function. If this base condition is false, then else will print value of i, and it will again call display function by passing i plus two and n. So initially i is one, so and suppose n is 21. So one and 21, both are unequal. So else will print one on console, and then display function will have three and 21 as an argument. This way this recursive process will take place. When this base condition is true, then last value will be printed and return will terminate the execution of recursive function call. Now I am executing this code. I am entering 21 as value of n. You can see output 13579 and so on till 21. All odd numbers are printed on console. So with the help of this recursive process, you can print all the odd numbers up to n on console and this program is implemented in C. So you can implement this code at your own. I hope you have understood how this process is working using recursion in C. Thank you for watching this video. If you want to watch more programming related videos, you can subscribe by YouTube channel. Thank you. .