title: Abort trap 6 error in C - mac terminal
body: <p>I'm learning C and recently I was trying some tutorials from youtube, and I was running this code, but it doesnt work I don't know why... when i run it on Terminal, gives an error "Abort trap: 6"</p>
  
  <p>I was following this tutorial : <a href="https://youtu.be/7F-Q2oVBYKk?list=PL6gx4Cwl9DGAKIXv8Yr6nhGJ9Vlcjyymq" rel="nofollow noreferrer">https://youtu.be/7F-Q2oVBYKk?list=PL6gx4Cwl9DGAKIXv8Yr6nhGJ9Vlcjyymq</a></p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  
  
  int main ()
  {
    char name[15] = "John Snow";
    printf("My name is %s\n", name);
  
    name[2] = 'z';                   
    printf("My name is %s\n", name);
  
    char food[] ="pizza";
    printf("The best food is %s \n", food);
  
    strcpy(food, "bacon");
    printf("The best food is %s \n", food);
  
    return 0;
  }
  </code></pre>