fork download
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3.  
  4. int main(int argc, char **argv, char **envp)
  5. {
  6. while(*envp!=NULL) {
  7. char * len = strchr(*envp, '=');
  8.  
  9. if (len == NULL)
  10. printf("%s\n", *envp);
  11. else
  12. printf("%.*s\n", len - *envp, *envp);
  13.  
  14. envp++;
  15. }
  16. system("pause");
  17. return 0;
  18. }
Success #stdin #stdout #stderr 0s 2924KB
stdin
Standard input is empty
stdout
TMPDIR
PATH
PWD
LANG
SHLVL
HOME
stderr
sh: 1: pause: not found