Explanation:-
So in this problem, we have to print the all directory/folder and subdirectory and subfolder. We have to print only the name of all directory/folder and subdirectory and subfolder. using file handling in which our program is situated or our program is saved in the directory.
Output:
Press any key to list and view all the files in the current directory :
1=main.cpp
2=..
3=.
4=a.out
need an explanation for this answer? contact us directly to get an explanation for this answer