title: How do I execute a .c file?
body: <p>I have a <code>.c</code> file with a program (obviously written in C):</p>
  
  <pre><code>#include &lt;stdlib.h&gt;
  
  int main(int argc, char** argv) {
    printf("Hello World\n");
    return 0;
  }
  </code></pre>
  
  <p>I'm having problems running it.</p>
  
  <p>At first, this happened:</p>
  
  <pre><code>$ ./file.c
  bash: ./file.c: Permission denied
  </code></pre>
  
  <p>I then added execute permissions with <code>chmod +x file.c</code>, but it still didn't work:</p>
  
  <pre><code>$ ./file.c
  ./file.c: line 3: syntax error near unexpected token `('
  ./file.c: line 3: `int main(int argc, char** argv) {'
  </code></pre>
  
  <p>However, as far as I know, this C program should be syntactically correct.</p>
  
  <p>How do I execute it?</p>