If you compile C / C ++ to create a Windows executable (or, possibly, for any x86 system), then static and global variables are usually stored in a memory segment called a data segment. This memory is usually also divided into initialized variables and those that are not initialized by the program in their definition.
Local variables defined inside functions are allocated in the running program stack along with the function return address.
"dynamic" , , new malloc. , "" ( "" )
, , .