Scoping question in C
William Park
opengeometry-FFYn/CNdgSA at public.gmane.org
Thu Jun 9 22:48:34 UTC 2005
I have question regarding scope of static string inside C function.
Suppose I have
char *x;
int func ()
{
x = "something";
return (1);
}
where 'x' is global variable being used elsewhere. Can I use 'x' after
func() exits? That is, is 'x' still pointing to string "something"?
--
William Park <opengeometry-FFYn/CNdgSA at public.gmane.org>, Toronto, Canada
ThinFlash: Linux thin-client on USB key (flash) drive
http://home.eol.ca/~parkw/thinflash.html
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list