#include #define MAX 10 int main() { // a c-string is an array of char with a 0 marking the end // also known as null-terminated string // or zero-terminated string char c[MAX] = { 'B', 'o', 'b', 0 }; // string is initialized to "Bob" - not the easiest way! char d[MAX]; //how to read it in? cin >> c; // cin reads in a single series of non-blank characters cout << c; // print them back out // how to copy a string from one place to another; strcpy(c,d); // copies string from d to c, i.e. c <- d // comparing 2 strings strcmp(c,d) // return value is // 0 if c,d are the same ("Tom" and "Tom") // negative if c comes before d ("Ann" and "Beth") // positive if the c comes after d ("Beth" and "Ann") }