Not sure what you mean by this. Could you provide an example?
Well, basically, it is easier to reuse a function that does one thing only, like calculate the area of a circle. The code you gave will always call printf() with that information, when it could be used in alternate ways.
And alternate uses can be necessary or even fun:
Code:
#include <stdio.h>
#include <windows.h>
double CircleArea(double radius)
{
return 3.141593 * radius * radius;
}
int main()
{
char message[1000] = "";
double slices = 2, total_slices = 9, size = 10;
sprintf(message, "You ate %2.1f square inches of pizza!\n", CircleArea(size / 2) * slices / total_slices);
MessageBox(NULL, message, "Pizza Alert", MB_OK);
return 0;
}
The amount of utility you can get out of some code effects how much work you need to do as a programmer, in general.