I was going through the the C tutorials and I accidentally copied/pasted something into my code that produced something odd. Here is my code:

#include <stdio.h>
#include <stdlib.h>

int main()

    char name[6] = "Logan";

        printf("Is %s learning anything? \n", name);

    char food[] = "tuna";

        printf("The best food is %s. \n", food);

    strcpy(food, "bacon");

        printf("The best food is %s. \n", food);

        printf("Is %s getting hungry? \n", name);

    return 0;

The very last printf command calls for the "name" char. However, when you run this, it does not retrieve the data to insert the name. 

I'm using to defining things like that in CSS where you can call upon them later anywhere throughout the document. My best guess is that with C, it linearly calls upon each array (the char's are basically arrays, correct?) and once you define a new array, it will forget about the old one? I would have to insert the "char name[6] = "Logan";" command again for it to work.

Am I sort of on the right track here? I'm very new to C, so I apologize if my questions seem a little...hard to understand.