Question discussion

What is the output of the following C code? int arr[] = {2, 4, 6, 8, 10}; int *p = arr; p++; printf("%d %d", *p, *(p+2));

546Medium DSSSB TGT Computer Science 0 replies 1 views
0
What is the output of the following C code? int arr[] = {2, 4, 6, 8, 10}; int *p = arr; p++; printf("%d %d", *p, *(p+2));
  • A2 6
  • B4 8
  • C4 6
  • D2 8
Correct answer: B

Discussion 0

Nobody has replied yet. Start the discussion!