SCHOOL OF CODE BUILDERS
Learn To CODE. Become A DEVELOPER.
Pages
HOME
DATA STRUCTURES
STRINGS
ARRAYS
MATRIX
BINARY TREES
LINKED LIST
STACK
QUEUE
SORTING
SEARCHING
C
PYTHON
PSEUDOCODE
CONTEST PROBLEMS
ALGORITHMS
PATTERNS
PHP
C PUZZLES
C INTERVIEW QUESTIONS
JAVA
C++
HASHING
RECURSION
BASIC C PROGRAMS
TCS-CODEVITA
FACEBOOK
CONTACT US
C program to calculate area of circle using pointer
C program to calculate area of circle using pointer
Output:
Enter the radius of the circle: 2
The area of circle with radius 2.000000 is 12.560000
Implementation:
#include
void calculatearea(float *area,float radius) { *area=3.14 * radius * radius; } int main(void) { float area,radius; printf("Enter the radius of the circle:\n"); scanf("%f",&radius); calculatearea(&area,radius); printf("The area of circle with radius %f is %f",radius,area); return 0; }
PREVIOUS
NEXT
HOME