A selection of functions in io.h can be used to search directories for files. Again, the Windows API, for example, has specific functions to achieve this, but the standard ANSI C implementation has some cross-platform equivalents.
You have not yet read about abstract data types such as structure, yet the directory search functions require that you populate a structure containing file data. This file data provides a skeleton that can be filled by the file-finding functions; at the outset, you populate it with some basic information, and the file-finding functions will fill it with the details of each file found.
The basic process is as follows:
Find the first file (with skeleton data).
Find the next file. ...