How to display all environment variables and its values (C/C++)
#include<stdio.h>
int main(int argc, char* argv[], char* env[])
{
int i=0;
while(env[i])
{
printf("%s\n",env[i]);
i++;
}
return 0;
}
int main(int argc, char* argv[], char* env[])
{
int i=0;
while(env[i])
{
printf("%s\n",env[i]);
i++;
}
return 0;
}
Comments
Post a Comment