In this program we are finding power of any number which will entered by the user and user will also enter a power. There is a function power which will return power of the number after calculating and Power function is taking two arguments number and power. While loop will run until power is not less than 1. After while loop will terminate the Power function will return the power of the number.
printf("enter a number who's power you want to find");
printf("enter any power");
r=power(n,p); //passing number and power to Power function
printf("the result is %d",r);
int power(int num,int p) //Power function taking two arguments
//While Loop it will run till power is greater than or equal to 1