Question: For this C++ program, I need to create a function called printArray and put it below fillArray and call it from main. #include #include using

For this C++ program, I need to create a function called printArray and put it below fillArray and call it from main.

#include

#include

using namespace std;

void fillArray(int a[], int size);

int main()

{

int ar[10];

fillArray(ar, 10);

for(int i = 0; i < 10; i++)

count << ar[i] << endl;

return 0;

}

void fillArray(inta[], int size)

{

for(int i = 0; i < 10; i++)

a[i] = rand() % 10 + 1;

}

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!