+ 1
Language C. If a global variable is also static, can it be modified by other program functions?
Global variabile
14 odpowiedzi
+ 4
yes it can be modified
+ 3
If you have large project, involving multiple source files (i. e. *.h,*.c). Then we can have global static variables. So, that they are accessible to all functions in the same file only. Outside the file, global static variables are not visible.
+ 2
Yeah yeah. but the question is "can they be modified by functions?"
+ 2
yeah, can be modify in multiple functions
+ 2
maybe you should try it out in a code instead of asking
+ 2
there is no theory in programming because you need to be sure, you need to write everthing and test it against all odds
+ 2
I mean that before answering it is necessary that the answer is correct.
+ 2
I'm sorry, but I didn't study psychiatry.
+ 1
global variable are not static, the exist all through the existent of the code, unlike static only exist in its defined function
+ 1
I have serious doubts about your answers.
+ 1
maybe I'm learning the theory first, at least that's important to know before answering questions incorrectly
+ 1
what do you mean Ruggero Quaglia ???
+ 1
if you think my answer is wrong am fine with that
0
no friend, the global are static. the local are automatic.