Skip to content
Related Articles

Related Articles

Improve Article

C Program for Program to find area of a circle

  • Last Updated : 31 Mar, 2021

Area of a circle can simply be evaluated using following formula. 

Area = pi * r2
where r is radius of circle  

C




#include <math.h>
#include <stdio.h>
#define PI 3.142
 
double findArea(int r)
{
    return PI * pow(r, 2);
}
 
int main()
{
    printf("Area is %f", findArea(5));
    return 0;
}
Output: 
Area is 78.550000

 

Time Complexity: O(1)

Auxiliary Space: O(1)

Please refer complete article on Program to find area of a circle for more details!
 

Want to learn from the best curated videos and practice problems, check out the C Foundation Course for Basic to Advanced C.

My Personal Notes arrow_drop_up
Recommended Articles
Page :