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

  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.

  1. External storage class:

Storage : main memory

Default value : zero

Scope : global

Lifetime : as long as the program execution doesn’t come to an end.