Memory (cont)
Local variables and parameters:
- known only within the function where they are defined
- exist in stack only during an invocation of that function
Global variables and string constants:
- known to all functions after their definition
- exist in global data area for entire execution of program
Dynamic objects:
- created by
malloc() ; accessible only via their address
- exist as soon as
malloc() 'd and until free() 'd
|