Monday, 20 February 2012

What are storage memory, default value, scope and life of Automatic and Register storage class? | C Programing

1. Automatic storage class :
                    Storage           : main memory.
                    Default value : garbage value.
                   Scope              : local to the block in which the variable is defined.
                  Lifetime           : till control remains within the block.
2. Register storage class:
                  Storage           :  CPU registers.
                  Default value :  garbage value.
                  Scope             :  local to the block in which the variable is defined.
                  Lifetime         :  till control remains within the block.

No comments: