title: compile and execute c program with argument
body: <p>I am new in C program and linux, how can we compile and run this program? </p>
  
  <p>I have tried <code>gcc example.c</code> then <code>./a.out</code> but it gives an error like <code>input file cannot be opened</code> ( I have written this error in the read method)</p>
  
  <pre><code>// example.c
  int main(int argc, char *argv[])
  {
      char* input = argv[1];
      read(input);
  
      char* output = argv[2];
      write(output);
  
      return 0;
  } 
  </code></pre>
  
  <p>Thanks.</p>