C++ Institute CLA-11-03 Question Answer
What happens if you try to compile and run this program?
#include
int *fun(int *t) {
return t + 4;
}
int main (void) {
int arr[] = { 4, 3, 2, 1, 0 };
int *ptr;
ptr = fun (arr - 3);
printf("%d \n", ptr[2]);
return 0;
}
Choose the right answer: