Write a library Cylinder containing functions to compute the total surface area, lateral surface area, and volume of a right-circular cylinder. For a cylinder of radius r and height h, these can be calculated using:
Total Surface Area = 2 x Pi r(r + h)
Lateral Surface Area = 2 x Pi rh
Volume = Pi r squared h
Write a driver program to test your library.© BrainMass Inc. brainmass.com March 4, 2021, 6:08 pm ad1c9bdddf
First compile the library file
gcc -c cylinder.c
this will ...
This solution teaches how to write a C library function that calculates the following functions for a Cylinder.
a) Total Surface Area
b) Lateral Surface Area
It also teaches how to compile the C library and how to use a C driver program to use the compiled C library.
Includes header file and .c program files.