title: I keep getting this error Segmentation fault (core dumped)
body: <p>I keep getting this error Segmentation fault (core dumped)</p>
  
  <p>My code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  
  int main(void)
  {
      char name[80];
      int length[10];
      length == sizeof(name)
      printf("What's your name?\n");
      scanf("%s", name);
      printf("The length of your name is %s", length);
  }
  </code></pre>
  
  <h1>EDIT</h1>
  
  <p>Okay so here's my new code</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  
  int main (void) 
  {
      char name[20];
      printf("What is your name?\n");
      scanf("%s", name);
      printf("There are %d letters in your name", strlen(name));
  }
  </code></pre>
  
  <p>And it still doesn't work.</p>