Question: Task II: Programming 1/ Consider the following C-code that reads the radius of a circle and computes its area and circumference. A function with the

 Task II: Programming 1/ Consider the following C-code that reads the

Task II: Programming 1/ Consider the following C-code that reads the radius of a circle and computes its area and circumference. A function with the prototype void FindAreaCircum (double radius, double *area, double *circum); is used to compute the area and the circumference by using pointer concept. #include void area_circum (double radius, double *area, double *circum); int main (void) { double radius, a, C; printf ("Enter the radius of the circle >"); scanf ("%1f", &radius) ; // function call FindAreaCircum (radius, &a, &c); // displaying the values of area and circumference printf ("The area=ff and circumference is $f ",a,c); return 0; } void FindAreaCircum (double radius, double *area, double *circum) { *area = 3.14 * radius * radius ; *circum = 2 * 3.14 * radius; } A/ Edit this code and execute it for the input radius: 3.5 B/ Modify this code to compute the area and the volume of the a Box whose dimensions are Length, Width, and Height. Use a separate function FindAreaVol with the prototype void FindAreaVol (double len, double w, double h, double *A, double *Vol); to compute the area and the volume

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

A Corrected Code for Circle Heres the corrected code with the fixes implemented c include void FindA... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!