You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
357 B
25 lines
357 B
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
#define NAME_MAX 80
|
|
#include <dirent.h>
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
DIR *dir ;
|
|
struct dirent *de;
|
|
|
|
if (argc != 1)
|
|
exit(1);
|
|
|
|
if ((dir = opendir(".")) == NULL)
|
|
exit(1);
|
|
|
|
while ((de = readdir(dir)) != NULL)
|
|
printf("%s\t", de->d_name);
|
|
|
|
printf("\n");
|
|
closedir(dir);
|
|
exit(0);
|
|
}
|