I know that there are multiple ways to accomplish this, i.e static
could be used on both the declaration and the definition OR it could only be used on the declaration.
Is this the common way of doing so?
// `static` on both the declaration and definition.
static void f1();
static void f1(){}
// `extern` on only the declaration (shared header file).
// then define in a single source file.
extern void f2();
void f2(){}
// `inline` usually doesn't need a declaration, just define it in a shared header file.
inline int f3(){}
int main(){
return 0;
}