Question: In basic C++ - Write a function named fillArrayRandomly that takes an integer array, its size, and an integer x representing the max value for

In basic C++ - Write a function named "fillArrayRandomly" that takes anIn basic C++

- Write a function named "fillArrayRandomly" that takes an integer array, its size, and an integer x representing the max value for the range between 1 and x. The function generates array size times random integers between the given interval. For generating random numbers, use the random library and std::uniform int distribution function. Each random number is assigned to the array element. The function returns nothing but changes the array items. (5p) - Write another function named "printFrequency" that takes a constant integer array and its size and max interval value, then prints the occurrence of each unique array item. (5p). - Write the main function that calls two functions appropriately for (5p) 1. the 1000-length integer array for initializing the random numbers between 1 and 10 (max) and prints the frequency of each number. 2. the 10000 -length integer array for initializing the random numbers between 1 and 10 (max) and prints the frequency of each number. - Do two histogram results represent the uniform distribution? Run the program at least three times and write your observation

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!