Technicalsymposium.com - New Updates Alerts-Subscribe


Our Telegram Channel - Join Us


Our Free Email Alerts - Join Us



Important Note:Login & Check Your
Email Inbox and Activate Confirmation Link

Our Whatsapp Group - Join Us


Technical Interview Materials PDF-Free Download





Technical Interview Q & A PDF





#include dirent.h

#include fcntl.h

#include sys/types.h

main()

{

char d_name[10];

DIR *dp;

struct dirent *dest;

printf("Enter the Directory Name:");

scanf("%s",d_name);

dp=opendir(d_name);

if(dp<0)

{

printf("DIRECTORY DOES NOT EXIST...");

}

else

{

while((dest=readdir(dp))!=NULL)

{

printf("%s",dest->d_name);

}

}

closedir(dp);

}

Outpu

t: [mca0610015@localhost ~]$ cc directory.c

[mca0610015@localhost ~]$ ./a.out

Enter the Directory Name:sample

kar...firstoneba[mca0610015@localhost ~]$

Source: Contents are provided by Technicalsymposium Google Group Members. 
Disclaimer: All the above contents are provided by technicalsymposium.com Google Group members. 
Further, this content is not intended to be used for commercial purpose. Technicalsymposium.com is not liable/responsible for any copyright issues.


Technicalsymposium.com-All Quick Links & Study Notes PDF- Free Download