fork download
  1. #include <stdio.h>
  2. int main(void){
  3. unsigned int value = 0x12345678;
  4. char *r = (char *) &value;
  5. int i;
  6. for(i=0; i<4; i++) {
  7. printf("Address of 0x%x = %u \n", r[i], &r[i]);
  8. }
  9. return 0;
  10. }
Success #stdin #stdout 0s 5536KB
stdin
123
stdout
Address of 0x78 = 2906840484 
Address of 0x56 = 2906840485 
Address of 0x34 = 2906840486 
Address of 0x12 = 2906840487