getenv

Look up a variable value from the environment.

char * getenv (char * var);

Required Header
<stdlib.h>

Return Value

This function returns a pointer to the variables value. A null pointer value indicates the variable does not exist in the environment.

Parameters

var

  The variable name

Remarks

The getenv function looks up the variable var and returns a pointer to its value in the environment. It is not safe to directly modify the returned value, instead use the _putenv function to change values.

Standard Library

See Also    _environ, _putenv