professor1942
Senior member
Alright, my crappy textbook is trying to tell me that this:
char sentence[] = "I like to eat pork chops";
is the same thing as this:
char *sentence = "I like to eat pork chops";
yet if I try manipulating the second version with strtok, strcpy etc. I get a runtime error. Can someone explain to me what the difference is?
Thanks
char sentence[] = "I like to eat pork chops";
is the same thing as this:
char *sentence = "I like to eat pork chops";
yet if I try manipulating the second version with strtok, strcpy etc. I get a runtime error. Can someone explain to me what the difference is?
Thanks