Question: In this question you have to write a complete function in C++ MyMedia Publishers uses two parallel arrays to keep track of the number

In this question you have to write a complete function in C++ 

In this question you have to write a complete function in C++ MyMedia Publishers uses two parallel arrays to keep track of the number of subscriptions for each of their 50 publications. Array publications holds the names of the magazines and newspapers published and array subscriptions holds the number of subscriptions for each corresponding magazine or newspaper. You have to write a void function, called findMost Subs to determine which publication has the most subscribers. Function findMostSubs has to return the name of the publication as well as the number of subscribers to that publication. Assume the following: A declaration of a global constant const int NUM_PUBS = 50; four declaration statements in the main function string publications [NUM_PUBS]; int subscriptions [NUM_PUBS]; //number of publications int nrMost Subscriptions; //number of subscriptions for string mostSubscriptions; //titles of the publications //number of subscriptions for the //corresponding publications //publication with most subscriptions //title of publication with // most subscriptions values have been assigned already to all the elements of the arrays the function is called in the main program as follows findMost Subs (publications, subscriptions, mostSubscriptions, rMost Subscriptions); Write down ONLY the complete function findMost Subs.

Step by Step Solution

3.48 Rating (151 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

public void findMostSubsstring publications int subscriptions out string mostSubscriptions ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!