Question: code in C follow the question instructions (b) Define and implement a function named countCommon that receives the following parameters: two arrays of integers al

code in C
follow the question instructions
code in C follow the question instructions (b) Define and implement a

(b) Define and implement a function named countCommon that receives the following parameters: two arrays of integers al and a2, and a positive integer n representing the size of both arrays. The function should return the number of common elements in the two arrays. (13 points) Example: al = (1, 2, 3, 4,5) a2 = (5, 7, 3,8,9) n=5 The function should retrun 2 since 3 and 5 are common in both arrays. 3 c) Implement a main function that performs the following: (12 points) Defines two integer arrays a1 and a2 of size 10 each. Fills al with values entered by the user. Fills o2with random values in the range 10 - 20 inclusive. Finds and prints out the number of common elements between a1 and a2 by calling the function countCommon defined above

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!