Today, we are going to share a C program to print environment variables. If you are a beginner and want to start learning the C programming, then keep your close attention in this tutorial as I am going to share a C program to print environment variables with the output.
We have designed this program for beginners for learning purpose. Copy below c program and execute it with c compiler to see the output of the program.
void main(int argc, char *argv, char * envp)
for (i = 0; envp[i] != NULL; i++)