An array called aList contains integers 5, 3, 7, 2, 8. What are the contents of aList after the function call workOnArray (aList, 4), if and the definition of workOnArray is:
int workOnArray (int a[], int n)
{
if (n == 1)
return a[0] + 3;
else
{
a[n] = workOnArray (a, n-1);
return 7;
}
}
a) 5, 3, 8, 8, 8
b) 5, 6, 10, 5, 11
c) 5, 3, 8, 7, 7
d) 8, 6, 10, 5, 11
c) 5, 3, 8, 7, 7
Computer Science & Information Technology