int main(int argc, char *argv[])
{
char *addr;
if(argc < 2)
{
printf("Usage:\n%s
exit(0);
}
addr = getenv(argv[1]);
if(addr == NULL)
printf("The environment variable %s doesn't exist.\n", argv[1]);
else
printf("%s is located at %p\n", argv[1], addr);
return 0;
}
No comments:
Post a Comment