During the execution of the program above what variables


Read the program below and answer the 3 questions that follow.
#include
int mystery(int x[], int size);
main()
{
int a[3] = {22, 11, 33}, b;
b = mystery(a, 3);
printf("a[0] = %d, b = %d\n", a[0], b);
}
int mystery(int x[], int size)
{
int i, temp = x[0];
for (i=1; i {
temp += x[i];
if (x[0] < x[i])
x[0] = x[i];
}
return temp;
}

1. During the execution of the program above, what variables exist in memory just before the statement "return temp;" executes, and what are their values? The values of pointer variables can be specified either by using the address operator & or by assigning names to represent addresses in memory diagrams.

2. During the execution of the program above, what variables exist in memory just before the statement "printf("a[0] = %d, b = %d\n", a[0], b);" executes, and what are their values?

3. Exactly what will be displayed when this program executes?

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: During the execution of the program above what variables
Reference No:- TGS0646642

Expected delivery within 24 Hours