Question: 2 Capitalizing Words This task requires writing a C program which reads text from standard input (one character at a time) and outputs the text

 2 Capitalizing Words This task requires writing a C program which

2 Capitalizing Words This task requires writing a C program which reads text from standard input (one character at a time) and outputs the text with the capitalization of some characters changed. Specifically, your program must capitalize the first character of each word in the text. Formally, a 'word' will be defined as any sequence of non-space characters, so 'raspberry' and 'pear' would be considered words, but so would sequences of punctuation or symbols, like-t=%., or mixtures of letters and symbols, like ',raspberry,'. As in the previous part, the end of the input stream will be signalled by the # character, and you may assume that the # character appears nowhere in the input. except to signal the end of the input stream. In the output, the first character of each word must be changed to uppercase, unless the word begins with a non-letter character, in which case it will be left unchanged. Other than the first character of each word, all other characters must be output without any modification. Your program must generate no other output besides the output described (including prompts to the user, like 'Enter some text'). Programs which generate extraneous output will be considered incorrect The submission for this part must be contained in a file called capitalize.c Examples Examples of the behavior of a correct implementation of capitalize.c are shown below. As in the previous section, user input is shown in blue and the program's output is shown in black. Example 1 (posted as three_lines.txt) This is a line of text This Is A Line Of Text THIS LiNE conTAINS unusual CAPITALization THIS LiNE ConTAINS Unusual CAPITALization This line contains symbols & lots of spaces This Line Contains Symbols & Lots Of Spaces! Example 2 watch out for words at the beginning and end Watch Out For Words At The Beginning And End

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!