default storage class specifier of a variable

Discussion in 'C Programming' started by ravi_shankar, Jul 5, 2003.

  1. ravi_shankar

    ravi_shankar Guest

    I know java,but I am just beginner in C.I have some confusions
    regarding extern storage specifier and default storage class specifier
    for a variable when it has file scope that is ,when it is not
    defined within
    any block
    ravi_shankar, Jul 5, 2003
    1. Advertisements

  2. ravi_shankar

    Jack Klein Guest

    The "extern" keyword is not a storage specifier, although it has some
    restrictions as to the storage duration of the objects with which it
    can be used. The "extern" keyword specifies that an object or
    function has external linkage, which means that it can be referred to
    by name from translation units other than the one it was defined in.

    As to storage duration, all objects defined at file scope have static
    storage duration. They also have external linkage unless defined
    specifically with the keyword "static", which gives them internal

    Jack Klein
    Home: http://JK-Technology.Com
    FAQs for
    Jack Klein, Jul 5, 2003
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.