fork download
  1. #include <stdio.h>
  2. int main(void){
  3. int ai[2]={ 0x0000FFCE, 0x01003201};
  4. short *ai2=(short *)(&ai[sizeof(ai)/sizeof(short)-3])-2;
  5. short *ai3=(short *)((char *)((short *)(ai+1) -1)-1);
  6. int n;
  7.  
  8. printf("%d\n", ai);
  9. printf("%d\n", ai2);
  10. printf("%d\n", ai3);
  11. for(n=0;n<7;n+=2)
  12. printf("%d,%d\n",n,*(short *)((char *)ai2+n));
  13. for(n=0;n<3;n++)
  14. printf("%d,%d\n",n,*(ai3+n));
  15.  
  16. return 0;
  17. }
  18.  
  19.  
Success #stdin #stdout 0.02s 1720KB
stdin
Standard input is empty
stdout
-1077422748
-1077422748
-1077422747
0,-50
2,0
4,12801
6,256
0,255
1,256
2,50