Global variable memory allocation





Hi all,
I am Ravi Kumar.N, I have a query regarding memory allocation
for global variable.


1) I know that for global variable memroy will be allocated during
compilation process and the value assigned for that variable will be
zero.

2) If we explicitly allocate some known value to the global variable,
the assignment of that value to the corresponding variable will take
place during compilation process or does it take place during execution
of the program.

Please let me know.


With regards,
Ravi Kumar.N

.



Relevant Pages

  • Re: Global variable memory allocation
    ... > 2) If we explicitly allocate some known value to the global variable, ... > place during compilation process or does it take place during execution ... actually called an "assignment". ... The language definition has nothing to say ...
    (comp.arch.embedded)
  • Re: Global variable memory allocation
    ... only for "global" variables (a concept the C language doesn't actually ... > 2) If we explicitly allocate some known value to the global variable, ... > place during compilation process or does it take place during execution ... actually called an "assignment". ...
    (comp.arch.embedded)
  • Re: Global variable memory allocation
    ... > 1) I know that for global variable memroy will be allocated ... > 2) If we explicitly allocate some known value to the global ... the assignment of that value to the corresponding ... > variable will take place during compilation process or does ...
    (comp.arch.embedded)
  • Re: gfortran problem
    ... conform or weren't allocated before the assignment. ... otherwise no automatic reallocation is ... Syntax error in character length specification at ... Syntax error in ALLOCATE statement at ...
    (comp.lang.fortran)
  • Re: Global variable memory allocation
    ... compilation process and the value assigned for that variable will be zero. ... the assignment of that value to the corresponding variable will take ... the variable is preassigned by the compiler or linker by generating a block of data in the binary file that represents the values for each pre assigned variable. ...
    (comp.arch.embedded)