Pregunta de entrevista de General Atomics

What is the difference between a static inside a function scope and a static outside that scope?

Respuesta de la entrevista

Anónimo

30 de mar de 2020

Static in C has 3 uses: 1. a variable declared static inside of a function maintains it's value between function invocations. 2. a function declared static has its scope localized to that module and is only callable from within that module. 3. a function declared static outside of a function has its scope localized to that module but is effectively a global within the scope of that module.