Monday, March 17, 2025

C Storage Classes - Trying to Save You Time

Storage Class Declaration Location Scope (Visibility) Lifetime (Alive)
auto Inside a function/block Within the function/block Until the function/block completes
register Inside a function/block Within the function/block Until the function/block completes
extern Outside all functions Entire file plus other files where the variable is declared as extern Until the program terminates
static (local) Inside a function/block Within the function/block Until the program terminates
static (global) Outside all functions Entire file in which it is declared Until the program terminates

Thank you Jason Fedin and Werner Raubenheimer.

No comments:

Post a Comment

Who Needs Cadence Anymore (for Schematic Tree Reporting that is :)? Make Your Own Reporter with chatGPT!

You know what I mean, if you've used Cadence - the SHIFT-T thing that gives you the schematic tree can be VERY useful, at times. No Cade...