Answered step by step
Verified Expert Solution
Question
1 Approved Answer
c++ plz help! Arrays Worksheet IlT 1. Write a function match which takes 2 integer arrays (named one and two) and returns the number of
c++ plz help!
Arrays Worksheet IlT 1. Write a function match which takes 2 integer arrays (named one and two) and returns the number of times "matches" occur in parallel positions in the two arrays. That is, count the number of timesI one [il two [i]. The size of both arrays is the same. The arrays'I are passed as parameters along with their size. 2. Write a prototype for your function in question 1.9 3. Write the statements to declare two arrays of size 25, read values into the arrays, call your match function, and print out the number of matches in the two arrays. 4. Write a function named count that will count and return the occurrences of a given character in an array named letters. The parameters will be the array letters, the size of the array, and the character to count.I For example: If the array contained the values and the character to count was 'a', then the function would returrn the value 3.91 5. write a prototype for the function in the previous problem. T 6. Write the statements to declare an array of characters, and initialize the array to contain the characters: f A @ N Z a 7 p Y h A. Call the count function and print the number of times the character p is contained in the array. 7. Write a function called search that receives an array of ints, the size of the array, and a number to search for. The function will return true if the number is contained in the array,and will1 return false otherwise.I 8. write a prototype for your search function. 9. Write the statements to call your function to search for the value 1500 in an array called salaries which has 100 elements. Print ag message telling whether the value was found in the array . Arrays Worksheet IlT 1. Write a function match which takes 2 integer arrays (named one and two) and returns the number of times "matches" occur in parallel positions in the two arrays. That is, count the number of timesI one [il two [i]. The size of both arrays is the same. The arrays'I are passed as parameters along with their size. 2. Write a prototype for your function in question 1.9 3. Write the statements to declare two arrays of size 25, read values into the arrays, call your match function, and print out the number of matches in the two arrays. 4. Write a function named count that will count and return the occurrences of a given character in an array named letters. The parameters will be the array letters, the size of the array, and the character to count.I For example: If the array contained the values and the character to count was 'a', then the function would returrn the value 3.91 5. write a prototype for the function in the previous problem. T 6. Write the statements to declare an array of characters, and initialize the array to contain the characters: f A @ N Z a 7 p Y h A. Call the count function and print the number of times the character p is contained in the array. 7. Write a function called search that receives an array of ints, the size of the array, and a number to search for. The function will return true if the number is contained in the array,and will1 return false otherwise.I 8. write a prototype for your search function. 9. Write the statements to call your function to search for the value 1500 in an array called salaries which has 100 elements. Print ag message telling whether the value was found in the arrayStep 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