Adds an environment variable or changes the value of an existing environment variable.
#include <stdlib.h> int putenv ( const char *string);
(IN) Points to a string that contains the name of an environment variable and its value in the form:
"name=value"
The “name” is composed of characters in 7-bit ASCII and can be up to ENV_NAME_MAX (80) characters in length. The name is followed by an equal sign (0x3D), and it is followed by “value,” which is an ASCIIZ string.
A string without a value ("name=") is the same as calling the unsetenv function for that environment variable.
If successful, returns 0. Otherwise, returns a nonzero value and sets errno to the following:
The putenv function makes the value of the environment variable equal to value by altering an existing variable or creating a new one.