Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > default storage class specifier of a variable

Reply
Thread Tools

default storage class specifier of a variable

 
 
ravi_shankar
Guest
Posts: n/a
 
      07-05-2003

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

--
Posted via http://dbforums.com
 
Reply With Quote
 
 
 
 
Jack Klein
Guest
Posts: n/a
 
      07-05-2003
On Sat, 05 Jul 2003 06:05:07 +0000, ravi_shankar
<> wrote in comp.lang.c:

>
> 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


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
linkage.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Storage class specifier of class members Sourabh Daptardar C++ 4 06-07-2008 08:43 AM
why Typedef is storage class specifier? sunny C Programming 1 10-16-2006 07:53 PM
Difference b/w storage class and storage class specifier sarathy C Programming 2 07-17-2006 05:06 PM
Disadvantages of register storage class specifier aruna C Programming 14 04-29-2004 07:44 PM
extern storage class specifier for variables ravi_shankar C Programming 6 07-04-2003 04:38 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57