title: How to read "string" from command line argument in C?
body: <p>I've a question about passing in parameters via the command line.</p>
  
  <p>My <code>main()</code> looks like</p>
  
  <pre><code>int main(int argc, char **argv){
    int b, d, n, flag;  
    char *init_d, tst_dir[100];
  
    argv++;
    init_d=*(argv++);
    //printf(); &lt;--------What do I have to do to init_d so that I can print it later?
  </code></pre>
  
  <p>If <code>argv</code> is a pointer to an array of pointers I'm assigning <code>init_d</code> to point to the value being pointed to by the pointer <code>argv</code> points to? (If that even makes sense)</p>
  
  <p>I assume I have to get that value into a character array in order to print it out but if I don't know the size of the "string" I am passing in, I am not sure how to achieve this.
  For instance if i run my code './myprogram hello' compared to './myprogram alongerinput'</p>