I want to display the full path of all subfolders and files of a directory one per line in GCC. The existing questions don't provide a solution for listing the full path.
For eg, If I have a directory /root/abc which contains two files(a.txt and b.txt) and a directory xyz, then the code must display the following
/root/abc
/root/abc/a.txt
/root/abc/b.txt
/root/abc/xyz