Link to home
Start Free TrialLog in
Avatar of zahmadian
zahmadian

asked on

how to print the contetnt of one directory?

Hi Experts,

How can I write a program in C which takes the path to the directory as an input, and prints the files, and directories inside that directory, like ls?

SOLUTION
Avatar of Kent Olsen
Kent Olsen
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of zahmadian
zahmadian

ASKER

suppose I am using readdir in while loop, then what is the condition to stop reading...
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial