blob: c8cf8529f1e02ff53da9eb2158108693cc9d5400 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001#include <stdio.h>
2#include <stdlib.h>
3#include <string.h>
4
5char *files[500];
6
7int
8main (int argc, char *argv[])
9{
10 FILE *fp;
11 int i;
12
13 for (i = 0; i < 500; i++) {
14 files[i] = tempnam (NULL, "file");
15 if (files[i] == NULL) {
16 printf ("tempnam failed\n");
17 exit (1);
18 }
19 printf ("file: %s\n", files[i]);
20 fp = fopen (files[i], "w");
21 fclose (fp);
22 }
23
24 for (i = 0; i < 500; i++)
25 remove (files[i]);
26
27 return 0;
28}