I want to have a static function which I declare in my .c file before defining it:
//file a.c version 1 static int foo(); ... static int foo() { ... }
As a sidenote, C++ provides a superior alternative to static. You can also use unnamed namespace here
static
Example,
namespace { void f() { } }
See these:
Superiority of unnamed namespace over static? Why an unnamed namespace is a "superior" alternative to static?