Although this question has come up before, mine is different because it is not supposed to cover anything OOP but only plain (ANSI) C.
Especially in open-source software, I usually encounter a plethora of functions (please don't call them methods since we're not in OOP) with the
static keyword preceding the data type.
But what effect does this actually have with plain C? In my own projects, I've never had an occasion where the
static keyword was actually needed. (Although a so-called expert programmer would probably have given me the advice, "This function should be declared static" and I would probably have replied in my own sarcastic way: "Uh-huh. Well, it works as-is, after all". :)).
From reading the OSS code, I assumed it might just generate less overhead when compiling the project. However, CPU have advanced in performance so much that I've wondered many times why there is such an ongoing interest to declare functions static even though it might need some benchmark tool to measure the differences in execution speed.