Imperative programming: Difference between revisions

Content deleted Content added
m C -- added wikilinks
m C -- changed wikilink to more stable article
Line 169:
:* ''Local variables'' declared using the <code>static</code> prefix are also stored in the ''global and static data'' region.<ref name="geeksforgeeks"/> Unlike global variables, static variables are only visible within the function or block. Static variables always retain their value. An example usage would be the function <code>int increment_counter(){ static int counter = 0; counter++; return counter;}</code>
 
* The ''[[Stack-basedcall memory allocationstack|stack]]'' region is a contiguous block of memory located near the top memory address.<ref name="lpi-ch6-p121">{{cite book
|title=The Linux Programming Interface
|last=Kerrisk