Sorting the Confusion between Storage Classes, Linkage, Duration & Scope

Back to C Programming

There are four distinct ideas that we need to master: Objects have storage duration, not linkage; and identifiers have linkage, not storage duration.

Duration

There are two kinds of duration:

Storage Classes

During the execution of a program, each object exists as a physical location in memory for a certain period, called its lifetime. The lifetime is determined by its storage duration which have corresponding storage class specifiers.

There are four kinds of storage duration static, thread, automatic and allocated.

Typically The are five storage class specifiers: static, extern, auto, register and typedef.
  • Automatic Duration
  • Each declaration can only have a single storage class specifier.

    Linkage

    There are three kinds of linkage:

    Sources

    http:///wiki/?storagelinkage

    21nov16   admin