You shall write a C program to implement some text handling task. Your C program shall firstly
ask for the name of the text file being inputted from the keyboard manually. Then, it shall open and
read this text file. Finally, your C program shall analyse the text and output a meaningful answer to
the screen and also to a file for submission with your C program.
Appendix 1 shows an example of the text file, which contains the following features:
The provided file contains typed text in the form of English words, punctuation marks and C
keywords, separated by space.
The punctuation marks in the text file include the following four: comma (,), full stop (.),
question mark (?), and exclamation mark (!).
The number of C keywords in the text file is more than 1 and less than 32.
At first, you shall create a header file (***.h) to include C keywords and 4 punctuation marks given
above, which will be then included in your C program. Your C program shall read and analyse the
text file, and then produce a correct output with the following format:
A line shall be output when your program reads either one of punctuation marks listed above or
one of C keywords from the text file. Note that the punctuation marks shall go with the text
being read already, e.g.
Do these capabilities exist in most other languages?
A keyword shall occupy one line itself, e.g.
goto
when a keyword is followed by a punctuation mark, they shall stay in one line, e.g.
char,
The total number of lines shall be counted and outputted as the last line with the prefix sentence
Total number of lines is: **.
Programming
[SOLVED] C You shall write a C program to implement some text handling task. Your C program shall firstly
$25
File Name: C_You_shall_write_a_C_program_to_implement_some_text_handling_task._Your_C_program_shall_firstly.zip
File Size: 904.32 KB
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.