C Program to list all files and sub-directories in a directory
DIR *dr = opendir(
(dr == NULL)
"Could not open current directory"
((de = readdir(dr)) != NULL)
All files and subdirectories
of current directory
Attention reader! Don’t stop learning now. Get hold of all the important C++ Foundation and STL concepts with the C++ Foundation and STL courses at a student-friendly price and become industry ready.