Question PRG-C-0041
MediumWhat is the output of this program?
#include <stdio.h>
int main() {
int a[] = {10, 20, 30, 40};
int *p = a + 1;
printf("%d %d %d", *p, *(p + 2), p[-1]);
return 0;
}
- A.
20 40 10
- B.
20 30 10
- C.
Sign up free to see the answer and a step-by-step explanation.