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 head it makes a difference between being global or local.
1.
2. Both the local variable and the global variable occupy the same space memory?
3. Where is the global variable stored in memory? And the variable local?
4. Is there any significant difference between these two?
Highlight that I'm not programming in pure Arduino, I'm programming in C and then I put it in the Arduino microcontroller.