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
Get step-by-step solutions from verified subject matter experts
