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


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
Get step-by-step solutions from verified subject matter experts
