Show how to get one of your process’s environment variables. The available variables vary by system; some of the common ones available on Unix include PATH, HOME, USER.
#include <cstdlib> #include <cstdio> int main() { puts(getenv("HOME")); return 0; }
Content is available under GNU Free Documentation License 1.2.