Just one more thing to be aware of. Since you didn't initialize the random generator with a seed, the `rand` function will use the default value of `1` as seed. As a consequence, this program will always create the same set of filenames in any run, and that might not be desirable for testing and analysis.

Quoting the man pages:

> The  srand()  function  sets  its  argument  as the seed for a new sequence of pseudo-random integers to be returned by rand().  These sequences are repeatable by calling srand() with the same seed value.
>
> If no seed value is provided, the rand() function is automatically seeded with a value of 1.