Where are arrays stored in C?
This question already has an answer here:
If int x1[5];
doesn't defined in any function, the array x1 is on your program's bss segment , variable x1 is a global array.
If int x1[5];
defines in any function, the array x1 is on your program's stack during executing this function.
I believe int x1[5];
goes on the stack.
上一篇: C ++模板typedef
下一篇: 数组在C中存储在哪里?