Write a library containing functions to compute the surface area and volume of a sphere. For a sphere of radius r, these values can be calculated using:
Surface Area = 4 Pi r squared (4 x Pie x r to the second power).
Volume = 4 Pi r cubed/3
Write a driver program to test your library.
First compile the library file
gcc -c sphere.c
this will ...
In this solution you will learn how to create C library function with the example of creating a library of functions and a driver program to compute the surface area and volume of a sphere.