Explain the different use cases for the static keyword in C. How does it affect a local variable versus a global function?