#include #include /* need to include for strlen, strcmp, strcpy functions */ #define SIZE 80 int main() { int i; char word[SIZE + 1] = {'h', 'e', 'l', 'l', 'o', '\0'}; char duplicate[SIZE + 1]; strcpy(duplicate, word); printf ("\nContents of word array:\n\n"); for (i = 0; i < strlen(word); i++) /* strlen function useful here... */ printf ("%c", word[i]); printf ("\n\n"); printf ("\nContents of duplicate array:\n\n"); for (i = 0; i < strlen(duplicate); i++) /* strlen function useful here... */ printf ("%c", duplicate[i]); printf ("\n\n"); strcpy(duplicate, "goodbye!"); printf ("\nContents of duplicate array after 2nd strcpy:\n\n"); for (i = 0; i < strlen(duplicate); i++) /* strlen function useful here... */ printf ("%c", duplicate[i]); printf ("\n\n"); }