Node:Other storage classes, Previous:Static variables, Up:Storage classes
There are three more storage class identifiers in C: auto
,
register
, and typedef
.
auto
is the opposite of static
. It is redundant, but is
included in contemporary versions of C for backwards compatibility. All
local variables are auto
by default.
register
is another outdated C storage class. Defining a variable
as register
used to store it in one of the computer's registers, a
specific location on its processor chip, thereby making code using that
variable run faster. These days, most C compilers (including GCC) are
smart enough to optimize the code (make it faster and more
compact) without the register
keyword.
typedef
allows you to define your own variable types. See More data types, for more information.