So the organisation of "x.h" and "x.c" (or "x.cpp") is a fairly standard way to do things. But some things don't fit in there, and sometimes you need a "constants.h" or some other name for things like PI
and SpeedOfLight
.
Something like sum
would fit nicely into a "utils.h" - whether you have enough to make it worth having a "utils.c"
Your .c file should include all header files that it needs (but no more).
For example:
#ifndef X_H__
#define X_H__
...
all the contents of x.h goes here
...
#endif
And header files should include all things THEY need themselves. So for example, if "x.h" needs "a.h" and "b.h", there should be #include "a.h"
and #include "b.h"
in "x.h" so you don't have to remember that:
If I include "x.h", I must put "a.h" and "b.h" before it.
At the same time, don't add more includes than you actually need...