Some implementations provide a nonportable environment pointer that is valid when main() is called but may be invalidated by operations that modify the environment.
The C Standard, J.5.1 [ISO/IEC 9899:2011], states
In a hosted environment, the main function receives a third argument,
char *envp[], that points to a null-terminated array of pointers tochar, each of which points to a string that provides information about the environment for this execution of the program.
...