The variable address that we normally ask for is a logical relationship where the actual physical address is not stored, even if the same logical address may correspond to a different physical address.
The initialized static variables and global variables are stored in the location of the data segment near the code snippet.
Uninitialized static variables and global variables are stored at the location of the data segment near the heap.
The position above the stack is the location of the environment variable, it is in the high address of the logical address, we usually generate executable files such as a.out or out, and its information stored in the code snippet is located in the following location, this location is stored in the executable code of all the necessary information, we are not specifically discussed here.
C + + storage location plots for all types of variables