/* * Example of using C string library */ #include #include int main() { char one_str[20]; // 19 characters plus the null character int i; strcpy(one_str,"Test String"); printf("%s\n",one_str); printf("the length %d of the strings\n",strlen(one_str)); // overflow, ... could generate a run-time error messages, but ... strcpy(one_str,"A very and very long test string"); printf("%s\n",one_str); printf("the length %d of the strings\n",strlen(one_str)); return 0; }