Question: 1. (28p) Write a C MAIN function and a FUNCTION to accomplish the following tasks. Within the MAIN function: Declare a two-dimensional 7X5 integer array

 1. (28p) Write a C MAIN function and a FUNCTION to

1. (28p) Write a C MAIN function and a FUNCTION to accomplish the following tasks. Within the MAIN function: Declare a two-dimensional 7X5 integer array A and initialize it with random numbers between 2 and 99 inclusive. Declare also an one-dimensinal integer array B with a reasonable size to hold the prime elements of the array A. Print the array A. Pass the arrays A and B to the FUNCTION as arguments and get the return value(the size of B, the number of prime elements of A stored in B) from the FUNCTION Print the array B. Within the FUNCTION: Read array A elements and compute and store the prime elements of A into the array B. (An integer n>=2 is said to be prime if and only if no integer k, 2

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!