/* * static.h * static.c and static.h demostrate how static functions are only visible locally * to the module in which they are created. static.c and staticlib.c both have * implementations of the function: "printStatic()". static.c calls printStatic to show * a local invocation of the function. static.c then calls "printStaticLib()" contained * in staticlib.c. printStaticLib in turn calls its local printStatic function. The output * of the two printStatic functions demonstrates that they are local to their own modules. * Static functions are useful when linking several modules that may have function declarations * that could collide. Static gaurantees that only the local definition of a given function * is invoked even if there are functions in other modules with the same declaration. */ #include #include static void printStatic();