Monday, 20 February 2012

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

1. Static storage class  :
             Storage            :  main memory.
            Default value   :  zero
            Scope               :  local to the block in which the variable is defined.
            Lifetime           :  till the value of the variable persists between different function calls.
2. External storage class :
                 Storage         : main memory
                 Default value: zero
                 Scope            : global
                 Lifetime        : as long as the program execution doesn't come to an end.

No comments: