C

How to Use Pow in C Language

In this tutorial, we are going to see how to use pow in C language. The pow() function in C is used to find the power of a given number. The pow() function is found in the header file math.h.
 


 

How to Use Pow in C Language
#include <stdio.h>
#include <math.h>
 
int main()
{
   printf ("2 ^ 2 = %f\n", pow (2.0, 2.0) );
   printf ("3 ^ 4 = %f\n", pow (3, 4) );
   return 0;
}

Output:
 

 

mcqMCQPractice competitive and technical Multiple Choice Questions and Answers (MCQs) with simple and logical explanations to prepare for tests and interviews.Read More

Leave a Reply

Your email address will not be published. Required fields are marked *