
- C Programming Tutorial
- C - Home
- C - Overview
- C - Environment Setup
- C - Program Structure
- C - Basic Syntax
- C - Data Types
- C - Variables
- C - Constants
- C - Storage Classes
- C - Operators
- C - Decision Making
- C - Loops
- C - Functions
- C - Scope Rules
- C - Arrays
- C - Pointers
- C - Strings
- C - Structures
- C - Unions
- C - Bit Fields
- C - Typedef
- C - Input & Output
- C - File I/O
- C - Preprocessors
- C - Header Files
- C - Type Casting
- C - Error Handling
- C - Recursion
- C - Variable Arguments
- C - Memory Management
- C - Command Line Arguments
- C Programming useful Resources
- C - Questions & Answers
- C - Quick Guide
- C - Useful Resources
- C - Discussion
C Program for Program to find the area of a circle?
The area is a quantity that represents the extent of the figure in two dimensions. The area of a circle is the area covered by the circle in a two dimensional plane.
To find the area of a circle, the radius[r] or diameter[d](2* radius) is required.
The formula used to calculate the area is (π*r2) or {(π*d2)/4}.
Example Code
To find the area of a circle using radius.
#include <stdio.h> int main(void) { float pie = 3.14; int radius = 6; printf("The radius of the circle is %d
" , radius); float area = (float)(pie* radius * radius); printf("The area of the given circle is %f", area); return 0; }
Output
The radius of the circle is 6 The area of the given circle is 113.040001
Example Code
To find the area of a circle using radius using math.h library. It uses the pow function of the math class to find the square of the given number.
#include <stdio.h> int main(void) { float pie = 3.14; int radius = 6; printf("The radius of the circle is %d
" , radius); float area = (float)(pie* (pow(radius,2))); printf("The area of the given circle is %f", area); return 0; }
Output
The radius of the circle is 6 The area of the given circle is 113.040001
Example Code
To find the area of a circle using Diameter.
#include <stdio.h> int main(void) { float pie = 3.14; int Diameter = 12; printf("The Diameter of the circle is %d
" , Diameter); float area = (float)((pie* Diameter * Diameter)/4); printf("The area of the given circle is %f", area); return 0; }
Output
The Diameter of the circle is 12 The area of the given circle is 113.040001
- Related Articles
- Java program to find the area of a circle
- Python Program to find the area of a circle
- Swift Program to Find the Area of a Circle
- Kotlin Program to Find the Area of a Circle
- JavaScript program to find area of a circle
- C Program for area of decagon inscribed within the circle?
- Find the Area of a Circle in Java Program
- C program to find the area of circle and cylinder using structures.
- Area of decagon inscribed within the circle in C Program?
- Program to find Circumference of a Circle in C++
- Area of circle inscribed within rhombus in C Program?
- Program to find the Area of a Parallelogram in C++
- Program to find the Area of a Pentagon in C++
- C Program for Area of a square inscribed in a circle which is inscribed in a hexagon?
- Program to calculate the area of an Circle inscribed in a Square

Advertisements