title: When i try to create a txt file in a certain directory there junk characters at then end of it
body: <p>I am trying to create a file inside a directory and at the end there are junk charecters this is my code:
  When the file is created there are some junk characters after the .txt</p>
  
  <pre><code>char *path=strdup(argv[1]);//argv[1] is a number from 1-9
  strcat(path,"/mynewfile.txt");
  FILE *f=fopen(path,"w");
  .....
  fclose(f);
  </code></pre>