title: c create file in terminal using freopen and argv[1]
body: <p>I'm trying to create a file using terminal in Unix. My code is below. I know for a fact argv[1] is picking up the data from the terminal screen, so for example when i do ./a.out newfile.txt, argv[1] has the value newfile.txt</p>
  
  <p>When I run the command ls to check my directory, the file is called argv[1]. Do i need to use some form of pointers to succeed in what I'm attempting?</p>
  
  <p>Regards</p>
  
  <pre><code>int main (int argc, char* argv[])
  {
    printf("File to create: %s \n", argv[1] );
    freopen("argv[1]", "w+", stdout);
    return 0;
  }
  </code></pre>