Declaration:
int getenv(char name[], char dest[]);
Description
Obtains the value of the name environment variable. The name should be in the upper case and should not end with the equal sign (=). The variable value is copied to dest.
Returned value
1, if the specified variable is found; and 0 otherwise.
Example
char value[MAXPATH];
getenv("COMSPEC", value);
|