Set or reset a variable value in the environment.
int putenv (char * var);
Required Header |
<stdlib.h> |
Return Value
This function returns 0 if successful. -1 indicates an error.
Parameters
var
The variable name
Remarks
The putenv function inserts or updates the variable var in the environment, with the value specified after an '=' in the variable name. A variable with the empty string after '=', or missing '=' altogether, will be removed from the environment.