Question
please rewrite the program 2. getBudget: Function consisting of an input parameter by reference that receives a variable of the type pointer representing the amount
2. getBudget: Function consisting of an input parameter by reference that receives a variable of the type pointer representing the amount allocated for expenses incurred during a month.
3. getNumberOfExpenses: Function that consists of an input parameter by reference that receives a variable of type pointer that represents the amount of expenses incurred during a month.
4. getDescriptionExpenses: Function that consists of three input parameters, one of them is a two- dimensional array of character type that will store the descriptions of each of the expenses and a pointer to a numerical array that stores each of the expenses. The third parameter of the pointer type stores the address of the amount of expenses incurred in the month. The purpose of the function is to ask the user in parallel format for the related information of each of the cats.
5. getTotal: Function consisting of three input parameters, one of which is a pointer to a numeric array that stores each of the expenses. The second parameter of the pointer type stores the address of the amount of expenses incurred in the month. The third parameter returns by reference the total sum of the expenses.
6. getLowestExpenses: Function consisting of two input parameters a pointer to a numeric array that stores each of the expenses The second parameter of type pointer stores the address of the amount of expenses incurred in the month. The purpose of the function is to return the index where the lowest expense is found.
7. getHighthestExpenses: Function consisting of two input parameters, a pointer to a numeric array that stores each of the expenses. The second parameter of the pointer type stores the address of the amount of expenses incurred in the month. The purpose of the function is to return the index where the highest expense is found.
8. Display: Function that consists of 3 input parameters, the two- dimensional array that contains the descriptions of each expense, the pointer of the first address of the expense array, the pointers where it stores the addresses of the variables that store the amount of the costs. The functions that calculate the total and the indices of the largest and smallest are called inside the function. The function prints if the person exceeds the amount assigned for the month or if at the end of the month and reporting his expenses he has money left over. The major and minor expense incurred indicating the description and its amount.
9. Implement a program that calls the above functions.
10. Use pointer notation in the manipulation of the numeric array
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