Question 3: Trace the following code, assume it compiles and…
Question 3: Trace the following code, assume it compiles and runs without errors. The initial addresses for the pointers are a=100, p=1000, and x=2000 #include int main(void) { int a[] = {12, 4, 18, 3, 7, 15}; int *p, *x; int n = 6; x = a; for (p = a; p < a + n; p++) { if (*p < *x) x = p; } printf("Value: %d at %ld\n", *x, x - a); return 0; } a) What is the functionality of this code? Explain.
Read Details