Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

read_line function is as follows: int read_line(FILE *fp, char *str, int n) { int ch, i =0; while ((ch = fgetc(fp)) != ' ') {

image text in transcribed

read_line function is as follows:

int read_line(FILE *fp, char *str, int n) { int ch, i =0; while ((ch = fgetc(fp)) != ' ') { // printf("%c", ch); if (i

return i; }

Project 7 Extra credit (40 points) Write a program that reads in a line of text, and display the acronyms in the sentences. The input are assumed be line of English words separated by white spaces comma, period, or exclamation point. The output contains the list of acronyms in the nput. lhe list of acronyms you will search for TBH, BRB, LOL, IDK, TTYL, IRL, TIA, AFK, CYA, FYI, OMG For example Input: TBH, 1DK ?f my hashtag will end up trending or if anyone will even like it. It will only be viral if people can relate to it IRL Output: TBH IDK IRL 1) 2) Assume input is no longer than 1000 characters. Assume the input contains no 3) You may find string library functions such as strtok, strcmp, and 4) To read a line of text, use the readline function in the lecture notes Name your program words.c. more than 500 words. Assume each word is no more than 50 characters. strcpy helpful

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions