title: how to create folders using mkdir in c?
body: <p>I'm trying to create a folder using mkdir in C but it wont't work </p>
  
  <p>the code won't create the folders</p>
  
  <pre><code>#include &lt;sys/stat.h&gt;
  #include &lt;sys/types.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  
  int main (){
      char chemin[256];
      char name[20];
      //char fichier[100];                                                        
  //  FILE *fp;                                                                   
      strcpy(chemin,"/home/Deva/Documents/prog/C/la/sds");
  
      mkdir(chemin,0755);
      if (mkdir(chemin,0755)==-1){
          printf("\nERROR\n");
      } else { printf("fichier creer"); }
  }
  </code></pre>