how can i write a function to call by reference ? using fopen, printf, fclose statements.
#define _CRT_SECURE_NO_WARNINGS #define PI 3.14159 #include <stdio.h> void findArea(double *area, double r); int main(void) { double area, r = 100.5; findArea(&area, r); printf("area = %.2lf\n", area); return 0; }
#define _CRT_SECURE_NO_WARNINGS
#define PI 3.14159
#include <stdio.h>
void findArea(double *area, double r);
int main(void) {
double area, r = 100.5;
findArea(&area, r);
printf("area = %.2lf\n", area);
return 0;
}
void findArea(double *area,double r){
*area=PI*r*r;
}
#using file fopen and fclose
data.txt
100.5
Get Answers For Free
Most questions answered within 1 hours.