Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C program Please help!! Seven friends have a contest to see who can get the most followers on social media. The winner gets an amount
C program
Please help!!
Seven friends have a contest to see who can get the most followers on social media. The winner gets an amount of five dollars for every follower he has. 1. Create the following functions: /*This function takes a filename of all friends and total number of followers they currently have (see sample input file). The names are read into account_holder and the number of followers are read into followers. The function should return 0 if the file does not open and 1 if all the file info is read in successfully*/ int get_account_info(char filename[], char account_holder[][20], int followers[]); /*This function takes a filename (the file to output to) along with the account names and followers. It should print out to file the same way shown below (outputfile.txt)*/ void exit_report(char filename[], char account_holder[][20], int followers[]) 2. Using the functions you created (no credit if you do not use the functions you created), create a program that matches the sample run and produces the given output file (name of the input and output file given on the command line-see sample run). You can also use the following helper functions if you want: Sample Run: C computer$ ./a.out inputfile.txt outputfile.txt /*finds a person and returns the index the name was found in...returns -1 if the person was not found*/ int find_person(char account_holder[][20], char person[]) int i; Add followers or exit? add Enter name of person to find: Levi Litter for(i=0;i
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started