TetaTricks/code/C/use_envp.c
2024-08-08 16:05:30 +02:00

17 lines
277 B
C

/* using envp for fun and profit */
#include <stdio.h>
int main(int argc, char *argv[], char *envp[])
{
char *cptr;
int idx = 0;
cptr = envp[idx];
while ( NULL != (cptr=envp[idx]) ) {
fprintf(stderr, "envp[%d] %p --> %s\n",
idx, cptr, cptr);
idx++;
}
return 0;
}