I know there are at least a few C developers here, so I was wondering if you
could answer a question. Is the following valid C? (I'm not asking if one
should actually do it; only if its valid at all.)
char *get_static_string(void) {
static char str[81] = "This is a statically allocated C string";
return str;
}
printf("%s", get_static_string());
I don't have a C compiler available at work else I'd try it myself.
Frank
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN