 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can print even numbers 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 Takimins that is available on Google Play. You can connect with me by following these details which are available in front of you. Now you can see a code which is written in front of you. The first statement is a comment which is showing print even numbers up to n using recursion in C. Then I have included a header file stdr.h, then display function is declared, its written type is void and it is containing two arguments of integer type. Then main function, two variables are declared inside main n and i. i is initialized with 0. Then printf statement, it will display enter value of n on console. Then scanf will read that number from user and that number will be stored inside n. Then display function is called which is passing i and n into definition of this function. So after main function, display function is defined which is receiving value of i and n. Here in this function, display function is called. So if we call a function inside its definition, that function treated as recursive function. So display is a recursive function. It is applying recursion inside it. So if condition is here for base condition, if condition is responsible for terminating recursive process, if this condition is true, then recursion will be terminated. Otherwise, else we'll call this function again and again. So if i is equals to n, then i will be printed and return statement will terminate the recursive calling. But if condition is false, then control will be transferred into else. Else will print value of i and it will again call display function by passing i plus two and value of n into the function. So if condition is true, then printf will execute once and recursion will be terminated. Otherwise, else will print value again and again and it will call display function more than one time. Now I am executing this code. I am entering 20. You can see all even numbers are displayed starting from zero to 20 on console. So this if condition is false first time because i is zero and n is 20. So else part is printed value of i and display function is called and it is passing two and 20. Then again condition, which is mentioned in if is false. So i is printing two and display function is passing four and 20 and this process will repeat. If this condition is false, then last value of i will be displayed and return will break the calling of this recursive function. So this is all about how to print even numbers up to n using recursion in C. I hope you have understood how using recursion we can perform this operation. If you want to watch more programming related videos, you can subscribe my YouTube channel. Thank you for watching this video.