fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. char *cp,ch;
  5. int *ip,i;
  6. float *fp,f;
  7. double *dp,d;
  8.  
  9. ch = 'A';
  10. i=10;
  11. f=11.11;
  12. d=22.22;
  13.  
  14. cp=&ch;
  15. ip=&i;
  16. fp=&f;
  17. dp=&d;
  18.  
  19. printf("1-1 %p %p %p %p\n",cp,ip,fp,dp);
  20. printf("1-2 %d %d %d %d\n",cp,ip,fp,dp);
  21. printf("1-3 %p %p %p %p\n",&ch,&i,&f,&d);
  22. printf("1-4 %d %d %d %d\n",&ch,&i,&f,&d);
  23.  
  24. cp++;
  25. ip++;
  26. fp++;
  27. dp++;
  28.  
  29. printf("2-1 %p %p %p %p\n",cp,ip,fp,dp);
  30. printf("2-2 %d %d %d %d\n",cp,ip,fp,dp);
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37. return 0;
  38. }
  39.  
Success #stdin #stdout 0s 9424KB
stdin
Standard input is empty
stdout
1-1 0x7ffc0ae225cf 0x7ffc0ae225d0 0x7ffc0ae225d4 0x7ffc0ae225d8
1-2 182592975 182592976 182592980 182592984
1-3 0x7ffc0ae225cf 0x7ffc0ae225d0 0x7ffc0ae225d4 0x7ffc0ae225d8
1-4 182592975 182592976 182592980 182592984
2-1 0x7ffc0ae225d0 0x7ffc0ae225d4 0x7ffc0ae225d8 0x7ffc0ae225e0
2-2 182592976 182592980 182592984 182592992