Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

keywords - Notepad File Edit Format View Help pokemon countdowntomars sagan countdowntomars critrole awc euler sotu pokemon countdowntomars gen4 critrole curiosity expanse awc leibnitz sagan

image text in transcribedimage text in transcribed

keywords - Notepad File Edit Format View Help pokemon countdowntomars sagan countdowntomars critrole awc euler sotu pokemon countdowntomars gen4 critrole curiosity expanse awc leibnitz sagan countdowntomars expanse awc leibnitz awc rics sotu sagan einstein critrole pokemon pokemon awc blizzconline einstein einstein pokemon expanse euler 4. Given a file containing keywords that were parsed from messages on a social media website, create a program that allows a user to determine if a keyword is trending or not. A keyword is considered trending if there are at least 3 occurrences of it in the given file. In your code, create a function that accepts a string and an array of strings. The function should return 1 if the input string is considered trending, 0 otherwise. Your program should accept two command line arguments (not including the program name) representing the name of the file to load and the keyword to check, respectively. Make sure you check that the given file exists. Format your output similar to the example run given below. The keyword should be printed in quotes. Use the file keywords.txt. Save your code as trending.c. $ ./a.out keywords.txt coffee "coffee" is not trending. $ ./a.out keywords.txt perseverance "perseverance" is trending with 6 messages

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

Databases DeMYSTiFieD

Authors: Andy Oppel

2nd Edition

0071747990, 978-0071747998

More Books

Students also viewed these Databases questions

Question

Can anyone be trained to be a project manager?

Answered: 1 week ago