mardi 4 août 2015

Can I declare an array first and give its value later?

I tried doing this but got an error. Why can't I do this?

int main()
{
char sweet[5];
sweet = "kova";
printf("My favorite sweet is %s\n", sweet);

return 0;
}

Aucun commentaire:

Enregistrer un commentaire