 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can calculate power of a number 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 TechMS that is available on Google Play. You can connect with me by following these details which are available in front of you. In this demonstration, I am going to implement a program to calculate power of a number using recursion in C. First of all, I am including a header file that is stdio.h. Then I am declaring a function power. This is function declaration. Here name of function is power. Its return type is integer and it will receive two arguments of integer type as input. Then main function. Inside main function, I am declaring three variables which are base, power and result. Then inside printf, I am typing our masses and the base value that I am going to read using scanf inside b variable. Then again printf enter power value scanf % b and % p. So with this way, base and power values will be available. For example, base is three and power is two. So it means we have to calculate three raised two. So three will be multiplied two times so that result can be evaluated. Now I am calling this power function and I am passing both the values inside it that are base and power. This statement is function call. Now I am going to display the calculated result using this printf statement and then return zero because return type of main is integer. This is complete implementation of main function. Now I am going to define power function. This block will be known as function definition. Inside this function definition, I have to implement some statements and this function will work in recursive process. So first I am going to implement a base condition. So if power value is zero, then it will return one else. It will return b into power b comma p minus one. This if condition is known as base condition here, which is responsible for checking whether the recursion process will be terminated or not. So if it is true, then return statement will return one and recursion will be terminated. Otherwise this else statement, which is containing another return, it will store b into inside the stack and then power function will be called again. So inside power function definition, I have called power function. That's why this function is recursive function and this statement is recursive function call. So power function will be called again and again and this definition will work more than one time. If this condition is true, then only return one will be executed and then this recursive process will be terminated. So now I am executing this code. I am entering base value two and power value three. You can see the result, which is eight. So it is calculating two raised three. It means two is multiplied three times two into two into two. So two into two four and four into two is eight. So this code is working properly. This way you can calculate power of a number using recursion in C. I hope you have understood this concept well. If you want to watch more programming related videos, you can subscribe my YouTube channel that is sanjaygupta underscore tech school. Thank you for watching this video.