\* C file handling program to print the list of files and subdirectories of the current directory *\
# include < stdio.h >
# include < dirent.h >
int main( )
{
DIR* dObj ;
struct dirent* dir ;
dObj = opendir(".") ;
printf("\nList of files and sub directories: \n" ) ;
if (dObj != NULL)
{
while ((dir = readdir(dObj)) != NULL )
{
printf("%s\n", dir->d_name ) ;
}
closedir( dObj ) ;
}
return (0) ;
}