Storage Class & Scope

The storage class of a variable refers to its lifetime during program execution.

 

The scope of a variable refers to its visibility.

 

The location at which a variable is declared, determines where it will be placed within memory.

 

Variables declared outside of any function have global scope and static (permanent) duration.

 

Variables declared within a function have local scope and automatic (temporary) duration.

 

Leave a Reply