Question: explain this answer : In a single sentence, what does the program below do? #include #include #include #include int main(int argc, char *argv[]){ DIR *dp;
explain this answer : In a single sentence, what does the program below do? #include #include #include #include int main(int argc, char *argv[]){ DIR *dp; struct dirent *dirp; dp = opendir("./"); while ( (dirp=readdir(dp)) != NULL) if(!opendir(dirp->d_name)) printf("%s ", dirp->d_name); closedir(dp); exit(0); } Your answer : prints the names of all regular (non directory) files
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
