title: char ** array c file input pgm
body: <p>I'm having some issues with a char** with file input. I'm doing a project where we are manipulating PGM files. I'm trying to get the header from the file using a char** but all it does is return null. It will run through the code that I have get the dimensions and return them to the screen but when I try to print the header I just get <code>(null)</code> as my output</p>
  
  <p>//Creation of the char**</p>
  
  <pre><code>char **header=(char**)malloc(2*sizeof(char*));
  </code></pre>
  
  <p>//File input</p>
  
  <pre><code>FILE * fin;
  fin=fopen(argv[1], "rb");
  fscanf(fin, "%s", *header);
  printf("%s", header[0]);
  fclose(fin);
  </code></pre>
  
  <p>I'm not 100% sure if I'm creating <code>header</code> right or not or if I'm printing <code>header</code> right either. Any help would be much appreciated.</p>