Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started