Created: 2023-01-11 17:15
Status: #concept
Subject: Programming
Tags: C Local Variable Block Scope

Automatic Storage Duration

Storage Duration (AKA extent) of a variable - is the portion or time of the program execution wherein storage for the variable exists.

  • allocated when the function is called.
  • deallocated when the function returns, disabling the variable.
  • A local variable DOES NOT retain its value when the enclosing function returns and is called again, unless it is Static.

References