I would like to know where in memory the global variables are stored. Thanks for your help.
This really just depends on the compiler you're using and the architecture you're targeting. For instance, I could make a compiler which assigns global variables to general purpose registers in bank 2 of a PIC16f887a microcontroller. It's arbitrary. This is a bad question.