[Solved] Difference between static variable and global variable in C++ in terms of Memory Management? [closed]

[ad_1]

There is no difference in terms of memory management. Static variables and global variables both have “static storage duration”, which means they are destroyed when the program exits.

[ad_2]

solved Difference between static variable and global variable in C++ in terms of Memory Management? [closed]