4
In my micro controller classes the variables are always defined globally and very rarely locally and I would like to know why, because in my mind it makes a difference between being global or local.
1. What is the difference in speed between?
2. Both the local variable and the global variable occupy the same space from memory?
3. Where is the global variable stored in memory? And the variable local?
4. Is there any other significant difference between these two?
Highlight that I am not programming in pure Arduino, I am programming in C and then put in the Arduino microcontroller.