InterviewSolution
Saved Bookmarks
| 1. |
In C, What Is The Difference Between A Static Variable And Global Variable? |
|
Answer» A static variable ia DECLARED outside of any function and it is accessible only to all the FUNCTIONS defined in the same FILE (as the static variable). In case of global variable, it can be accessed by any function (including the ones from different FILES). A static variable ia declared outside of any function and it is accessible only to all the functions defined in the same file (as the static variable). In case of global variable, it can be accessed by any function (including the ones from different files). |
|