It's simple question but i just couldn't figure out. I've been trying to make an approach to replace the content of one string by part of it's content like, replace "He is a boy" to "is a boy" as follow:
int main() {
char array[] = "he is a boy";
strcpy(array, &array[3]);
printf("%s\n", array);
}
But the program just stopped at strcpy statement. Is there any problem using strcpy or any other method to achieve the same purpose?? BTW, I'm using X-code on my mac. Thx~