 Hello friends, I am Sanjay Gupta. I welcome you on my channel. You can watch various programming related videos here. My channel contains more than 800 videos. You can search these videos through the keyword programming by Sanjay Gupta. In this video, I am going to demonstrate you use of POW function. So I will be limiting it as predefined function and later on I will demonstrate you how you can implement POW as user defined function. It means you can make your own POW function process. So first I am going to demonstrate you the implementation of POW function as predefined function. So this function is available with math.h header file. So whenever you want to use POW as predefined, you must have to include this math.h header file. Now I am defining main function. Here I am taking float variables b comma p comma result. So b stands for base, p stands for power and the calculated result will be stored in result variable. Now I have to receive values from user. So I am asking enter base and power value to read those values I am using scanf so base will be stored inside b variable and power will be stored inside p variable. Now I am going to call POW and I am passing both the arguments base and power into it. So the returned value will be stored inside result variable. So result equals to percentf and then result variable. So this way I have implemented use of POW as predefined function. Now I am going to execute it. So you can see it is asking for base value and power value. So I am going to enter base as 2 and power as 3. So the result is 8. So if we multiply it 2, 3 times that is 2 into 2 into 2 then the result will be 8. So the program is working properly and this is the base of implementation of POW as predefined function. Now I am going to tell you how you can create your own user defined function. So for that I am removing this header file and you have to declare your own function like this. So this is declaration. Here you have to call your own function now. I am going to define it. This block will be known as definition which will be containing the logical part. So base value will be available with B and power value will be available with P. So here I am declaring a variable result which will be upload time. It is initialized with 1 in this variable I. Now I am going to implement a loop which is starting from 1 and it will repeat P times. It means I am going to multiply base value power times. So power value suppose it is 3 so this loop will repeat 3 times and 3 times base value will be multiplied. So for that I am implementing this result equals to result multiplied by base. So after completion of this loop and that returned value of result will be stored inside result variable which is available inside main function at line number 9. And then result will be displayed on output screen with the help of line number 10. So this way I have implemented my own user defined function for calculating power value. So in this code a user has to enter both the values base and power and the calculated result will be displayed on output screen. So again I have to execute this code so that you can understand whether it is working properly or not. So I am going to execute it. You can see it is asking for base and power values. Again I am entering base as 2 and power as 3. You can see the output it is again showing the result as 8. So you can implement both the variations of POW function you can use it as predefined function with the help of math.h header file as well as you can implement your own user defined function that is power. You can name it power or any other name you can use because in case of user defined function you can create a function with any particular name. But remember that name should be significant so that you can understand what process it will be so I hope you have understood both the variations well If you want to watch more programming related videos you can follow my youtube channel. Thank you for watching this video.