Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 41557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:11:58+00:00 2026-05-10T15:11:58+00:00

When someone talks about a variables storage class specifier, what are they talking about?

  • 0

When someone talks about a variables storage class specifier, what are they talking about?
They also often talk about variable linkage in the same context, what is that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T15:11:59+00:00Added an answer on May 10, 2026 at 3:11 pm

    The storage class specifier controls the storage and the linkage of your variables. These are two concepts that are different. C specifies the following specifiers for variables: auto, extern, register, static.

    Storage
    The storage duration determines how long your variable will live in ram.
    There are three types of storage duration: static, automatic and dynamic.

    static
    If your variable is declared at file scope, or with an extern or static specifier, it will have static storage. The variable will exist for as long as the program is executing. No execution time is spent to create these variables.

    automatic
    If the variable is declared in a function, but without the extern or static specifier, it has automatic storage. The variable will exist only while you are executing the function. Once you return, the variable no longer exist. Automatic storage is typically done on the stack. It is a very fast operation to create these variables (simply increment the stack pointer by the size).

    dynamic
    If you use malloc (or new in C++) you are using dynamic storage. This storage will exist until you call free (or delete). This is the most expensive way to create storage, as the system must manage allocation and deallocation dynamically.

    Linkage
    Linkage specifies who can see and reference the variable. There are three types of linkage: internal linkage, external linkage and no linkage.

    no linkage
    This variable is only visible where it was declared. Typically applies to variables declared in a function.

    internal linkage
    This variable will be visible to all the functions within the file (called a translation unit), but other files will not know it exists.

    external linkage
    The variable will be visible to other translation units. These are often thought of as ‘global variables’.

    Here is a table describing the storage and linkage characteristics based on the specifiers

       Storage Class   Function            File    Specifier        Scope              Scope   -----------------------------------------------------   none           automatic         static                        no linkage        external linkage   extern          static            static                  external linkage  external linkage   static          static            static                  no linkage        internal linkage    auto           automatic         invalid                  no linkage  register         automatic         invalid                  no linkage 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In the NSObject Class Reference they talk about an isa instance variable which is
Whenever someone talks about a services-based architecture, they often mention scalability, often in the
Could someone please explain? I couldn't find anything on the internet, everything talks about
Someone told me about swamp diagrams explaning that they were useful to predict code
Someone told me about a C++ style difference in their team. I have my
Someone asked me a question via e-mail about integer partitions the other day (as
At about the 19:00 mark in his RailsConf presentation , David Heinemeier Hansson talks
In section 15.12.2.5 of the Java Language Specification , it talks about how to
I was reading a blog post on msdn about iterators which talks about about
Someone please correct me if I'm wrong, but parsing a yyyy/MM/dd (or other specific

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.