home *** CD-ROM | disk | FTP | other *** search
/ C Programming Starter Kit 2.0 / SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso / tyc / list1611.c < prev    next >
C/C++ Source or Header  |  1993-10-16  |  436b  |  23 lines

  1.  /* Demonstration of temporary filenames. */
  2.  
  3.  #include <stdio.h>
  4.  
  5.  main()
  6.  {
  7.      char buffer[10], *c;
  8.  
  9.      /* Get a temporary name in the defined buffer. */
  10.  
  11.      tmpnam(buffer);
  12.  
  13.      /* Get another name, this time in the function's */
  14.      /* internal buffer. */
  15.  
  16.      c = tmpnam(NULL);
  17.  
  18.      /* Display the names. */
  19.  
  20.      printf("Temporary name 1: %s", buffer);
  21.      printf("\nTemporary name 2: %s", c);
  22.  }
  23.