Global variable-heap???

Mar 8, 2014 at 7:12pm
Hello!
Please, if we have a global variable, declared on the very beginning of the program, variable of ANY TYPE (int, char, array, struct), if it is declared before the begining of other functions (main and others), is its value in the heap or in the stack memory?

I think in heap, but could someone please tell me if I am right?
Many thanks!

Mar 8, 2014 at 7:17pm
Topic archived. No new replies allowed.