[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Classes                  Data and Function Storage Classes

    An object's class determines its lifetime and scope.  C allows
    objects to be allocated space permanently (conceptually at compile-
    time), or dynamically, at run-time.  Therefore, an object's lifetime
    may be temporary or permanent.  The area of a program over which an
    object is visible is termed its scope.  The various scopes are block,
    function, and source file.  Scope and life is determined by a
    combination of class keywords and whether the placement of a
    declaration is inside a function definition or outside.

      Notes:    If a variable's declaration is outside a function and it
                has no class specifier, it is an external definition, and
                as such, may have an initializer list that can be
                evaluated at compile-time. This variable can be accessed
                from other source code files by using the extern class in
                those files. If the declaration is inside a function and
                it has no class specifier, auto class is assumed.

                Unless a function is declared to have class static, it
                has class extern.


See Also: auto register static extern
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson