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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!