int main()
{
charactername="tom";
characterage=78;
printf("his name is %s\n", charactername);
printf("his age is %d\n", characterage);
characterage=78;
charactername="John";
printf("his name changed to %s\n", charactername);
printf("his age changed to %d\n", characterage);
return 0;
}
when I change the character name in between the code, the code does not run whereas if I only change the age the code run perfectly ,why can't I change the character variable but i can change the characters age??(in c language)