some-usable-scripts/c/old/printenv.c

15 lines
224 B
C
Raw Normal View History

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main( int argc, char **argv, char **envp)
{
// I will display all the environment variables
while(*envp != NULL)
{
printf("%s\n", *envp);
*envp++;
}
}