Question: 1.a) Generate an array of 20 random integers from 0 to 9. Search for the first occurrence, if any, of the number 7, and report
1.a) Generate an array of 20 random integers from 0 to 9. Search for the first occurrence, if any, of the number 7, and report its position in the array.
b) Repeat the computation of part (a) 1000 times, and for each position in the array, report the number of times that the first of a 7 in the array is at that position.
2.Generate an array of 10,000 random numbers from 0 to 4. Report the percentage of each of the numbers, 0, 1, 2, 3, and 4 in the array.
In C programming Language.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
