Write the definition of a function printArray , which has two parameters. The first parameter is an array of int s and the second is an int , the number of elements in the array. The function does not return a value. The function prints out each element of the array, on a line by itself, in the order the elements appear in the array, and does not print anything else.
i have:
Code:
void printArray(int a[], int n)
{
for (i=0; i < n ; i++)
printf("%d\n",a[i]);
}
i have to turn this into an online quiz kinda thing but it's telling me its incorrect and i need to add something prior to the for.