how do I write a c language program that will open a user specified
text file (full path expected) and read file (character by character)
to determine and output the total number of words and the total number
of sentences in that file. Both a word and a sentence shall begin
with one of the following: ?0? to ?9?, ?A? to ?Z? or ?a? to ?z?. A
word once started shall end with the first occurrence of a space, tab,
or an end-of-line (unless preceded by a hyphen). A sentence shall end
with a ?.? (period), ??? (question mark) or ?!? (exclamation point),
and one of the following: two spaces, one space and end-of-line,
end-of-line, double quote and space or a double quote and an
end-of-line. Protect program against crashing when user enters bad
file name. |