Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

22 řádky
388 B

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4. #include <dirent.h>
  5. #include <sys/stat.h>
  6. int main() {
  7. DIR *d = opendir("/");
  8. if (d == NULL) {
  9. perror("opendir");
  10. exit(1);
  11. }
  12. struct dirent *entry;
  13. while ((entry = readdir(d))!= NULL) {
  14. if (entry->d_name[0] == '.')
  15. continue;
  16. printf("%s ", entry->d_name);
  17. }
  18. }