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.
3. 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.
4. External storage class:
Storage : main memory
Default value : zero
Scope : global
Lifetime : as long as the program execution doesn't come to an end.
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.
3. 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.
4. 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:
Post a Comment