title: fprintf segfault
body: <pre><code>  char* output= (char*) argv[2];
   92     fp = fopen(output, "w");
   93     if( fp = NULL )
   94     {
   95         printf("writing output failed");
   96         return 0;
   97     }
   98     fprintf(fp,"hello");
  </code></pre>
  
  <p>This is causing seg fault exc bad memory at line 98.
  What am I missing??</p>