Given an array of pointers to string literals:
char *textMessages[] = { \"Small text message\", \"Slightly larger text message\", \"A really larg
You should use the strlen() library method to get the length of a string. sizeof will give you the size of textMessages[2], a pointer, which would be machine dependent (4 bytes or 8 bytes).
strlen()
sizeof
textMessages[2]