Value of uninitialized char

C

Christian Staudenmayer

Nirvana said:
What's value of uninitialized char declared outside of any function ?

cheers

If you declare it outside of any function without any explicit
qualifiers, it will be a static variable, hence its value will be 0
(i.e. '\0').

Greetings, Chris
 
P

Peter Shaggy Haywood

Groovy hepcat Christian Staudenmayer was jivin' on Sun, 14 Nov 2004
22:50:07 +0100 in comp.lang.c.
Re: Value of uninitialized char's a cool scene! Dig it!
If you declare it outside of any function without any explicit
qualifiers, it will be a static variable, hence its value will be 0

No it won't. It will have static duration. But it will not be "a
static variable". Indeed, if declared with any qualifiers (except
typedef) it will be an object with static duration. But that does not
make it a static qualified object (unless, of course, it is declared
with a static qualifier).
It's just a nitpick; but let's get our terminology straight so we
don't confuse each other.

--

Dig the even newer still, yet more improved, sig!

http://alphalink.com.au/~phaywood/
"Ain't I'm a dog?" - Ronny Self, Ain't I'm a Dog, written by G. Sherry & W. Walker.
I know it's not "technically correct" English; but since when was rock & roll "technically correct"?
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top