home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / c / msc51 / example / demo.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-08-11  |  419 b   |  25 lines

  1. main(argc, argv, envp)
  2.     int argc;
  3.     char **argv;
  4.     char **envp;
  5.  
  6.     {
  7.     register char **p;
  8.  
  9.     /* print out the argument list for this program */
  10.  
  11.     for (p = argv; argc > 0; argc--,p++) {
  12.         printf("%s\n", *p);
  13.         }
  14.  
  15.     /* print out the current environment settings.  Note that
  16.      * the environment table is terminated by a NULL entry
  17.      */
  18.  
  19.     for (p = envp; *p; p++) {
  20.         printf("%s\n", *p);
  21.         }
  22.  
  23.     exit(0);
  24.     }
  25.