// Justin C. Miller
// University of Wisconsin Oshkosh
// Made for: http://www.geocities.com/neonprimetime.geo/index.html
// Date: 2001
// Borland Builder 4.0
// strlen, strcpy, strcat, strcmp
#include
#include
int main()
{
// notice the \0, this is the NULL character
// it is used to determine where the end of a string is
// if you use a c-string, you should always include the \0
char string1[15] = "Hello World!\0" ;
char string2[15] = "Bye Bye!\0" ;
char string3[15] = "\0" ;
cout << "string1=(" << string1 << ")" << endl ;
cout << "string2=(" << string2 << ")" << endl ;
cout << "string3=(" << string3 << ")" << endl << endl ;
cout << "the length of (" << string1 << ") is " << strlen(string1) << endl < 0)
cout << "(" << string2 << ") is later alphabetically than (" << string3 << ")" << endl ;
else
cout << "(" << string2 << ") is earlier alphabetically than (" << string3 << ")" << endl ;
// to concatenate means to put together or make one
// using strcat combines string1 and string2 and puts the result
// into string1
cout << "string1 and string2 concatenated =(" << strcat(string1, string2) << ")" << endl ;
getch() ;
return 0 ;
}
               (
geocities.com/neonprimetime.geo/cpp)                   (
geocities.com/neonprimetime.geo)