[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Ignore last post, C Programming question
- To: luci-discuss@luci.org
- Subject: Ignore last post, C Programming question
- From: "Travis Davies" <travisdavies@gmail.com>
- Date: Wed, 11 Apr 2007 09:34:15 -0500
- DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=F3Fi/+JTTwFCwxBAr36PydtmB8TQACGtxAoo6F9OzX/vMlr5tzkroGYT2NclDbKnlDXtAvoaQsCRLzNVxE8T4yY/Traq77dNUoerF525R8EsyUOXAP74wIdm5OtLrLNDTnKVSLXdt16H75uYADegNeh0K0arFd4wcdyUH/Q0eo8=
- DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=pIuK31RMjNhoYYkCtT+t/QAh7LHSvZMSStssl1/D5BPVYTCX6xFBJ3Gdw8iye+B3TOriOgsT7xYtGNV5jzdXmR0k59l8Hk2udo3O/OxQlSJPrG5Pf6UvUkpquiEjDkB55hJlHfVf970YkvgsbAMelaiBgm85t1CBCunKib78kZE=
- Organization: Linux Users of Central Illinois
- Reply-To: luci-discuss@luci.org
- Sender: luci-discuss-owner@luci.org
Hi everyone!
Sorry for the accidental half written post before.
I have a small question for all of you C coders.
Lets say my main() looks like this:
int main(){
{
int x = 0;
do_something_using_x
}
DO_SOMTHING_ELSE....
return 0;
} // end of main
I understand that x is local to that particular segment. But when that segment terminates (and never used again) does x still exist? or is it destroyed/free-ed and given back to the system?
Sincerely,
Travis
--
By moral standard, I reject the the pursuit of material wealth as the primary goal of living.