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

You might also like to view...

What type of web animation can be used instead of Flash?

What will be an ideal response?

Computer Science & Information Technology

List the three primary skill sets of a graphic designer:

What will be an ideal response?

Computer Science & Information Technology