Professional Documents
Culture Documents
• Static variables that are not explicitly initialiazed in their decleration are
initialized to zero (0) at run time (notice that the initialized static variables
and uninitializes static variables occupy different sections in the program
image)
• Static variables can make a program unsafe for threaded executions (they are
not thread-safe)
• External static variables also make code harder to debug as succesive
invocation of a function that references a static variable may behave in an
unexpected way (!! Avoid using static variables except for under controlled
circumstances!!)
• If you want to return the number of tokens, you can pass a pointer to
the arg array as in:
int makeargv(char *s, char ***argvp)
#include <stdio.h>
return 0;
}
Process Environment (cont.)
#include <stdlib.h>