fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(void)
  5. {
  6. int t[] = { 8, 4, 2, 1 };
  7. int *p = (int *)malloc(sizeof(t));
  8. int i;
  9. for(i = 0; i < 4; i++)
  10. p[3 - i] = t[i];
  11. printf("%d",*(p + 2));
  12. free(p);
  13. return 0;
  14. }
Success #stdin #stdout 0s 5272KB
stdin
Standard input is empty
stdout
4