C program to list all files present in a directory/folder in which executable file of this program is present. For example, if the executable file is present in C:\\TC\\BIN then it will list all the files present in C:\\TC\\BIN.
C programming code (Turbo C compiler only)
struct ffblk a;
printf("Press any key to view the files in the current directory\n");
done = findfirst("*.*", &a, 0); // The first '*' is for all file names and the second one is for all file extensions
done = findnext(&a);
Apparently, you will get a different output when you execute the program on your computer.