#include <stdio.h>
#include <stdlib.h>

int main (void) {
  char * str;
  printf ("test of environmental variable access by programs\n");

  /* retrieve and print the environmental variable PATH */
  str = getenv("PATH");
  printf ("The process path name is '%s'\n", str);

  /* reset the environmental variable */
  setenv ("PATH", "/home/walker/c", 1);
  
  /* retrieve and print the revised environmental variable PATH */
  str = getenv("PATH");
  printf ("The new process path name is '%s'\n", str);

  return 0;
}


