Last active
October 24, 2017 16:52
-
-
Save dstein64/86d7d6444e80d150a5f826e809ba7384 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*** printenv.c ***/ | |
// Description | |
// printenv - print the environment to stdout | |
// Synopsis | |
// printenv | |
// Build | |
// $ gcc -o printenv printenv.c | |
#include <stdio.h> | |
int main(int argc, char* argv[], char* envp[]) { | |
for (int i = 0;; ++i) { | |
char* p = envp[i]; | |
if (p == NULL) break; | |
printf("%s\n", p); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment