The second word

(a) Write a program that writes the second word (and its length) in an array of characters. Words are separated by spaces, punctuation and tabs. Test your code on the sentence ``Actually, couldn't you come with me?'' The correct answer should be couldn't(8). If you're stuck, you can follow the template below.

// test if c is in the array containing all the valid separators
bool isSeparator(char c, char* separators); 
// return the length of the char array a
int charArrayLength(char *a);
int main(int argc, char** argv) {
  // find the beginning of the second word
  // find the end of the second word
}



Subsections

Leo Liberti 2008-01-12