Storage of c variables in memory

I want to know which variables are stored in stack, heap, etc. Suppose i have a variable, an array , a pointer , etc. Where will these be stored(stack,heap,unknown)? And where are static variables stored. Where will a variable, an array, a pointer be stored when they are declared as static? And where are global variables and variables declared as extern stored.


Statics and globals are stored in global data memory (not stack or heap). extern has effect on storage.

链接地址: http://www.djcxy.com/p/82512.html

上一篇: 级别的静态变量获得分配/初始化?

下一篇: 将c变量存储在内存中