[ create a new paste ] login | about

Link: http://codepad.org/1O4xDCLM    [ raw code | output | fork ]

C, pasted on Jun 23:
#include <stdio.h>
#include <dirent.h> 

int main(void) {
 printf("Hello World\n");

 GetDirectories();
}

void GetDirectories()
{
  DIR *d;
  struct dirent *dir;
  d = opendir(".");
  if (d) {
    while ((dir = readdir(d)) != NULL) {
      printf("%s\n", dir->d_name);
    }
    closedir(d);
  }
  return(0);
}


Output:
1
Hello World


Create a new paste based on this one


Comments: