fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4.  
  5. int main(void) {
  6. // your code goes here
  7. int *p = (int *)malloc(sizeof(int));
  8. *p = 0x8F7E1A2B;
  9. printf("%X\n", *p);
  10. printf("%d\n",sizeof(*p));
  11.  
  12. unsigned char *q = (unsigned char *)p;
  13. printf("%d\n",sizeof(*q));
  14. printf("%X\n", *q++); //
  15. printf("%X\n", *q++); //
  16.  
  17. return 0;
  18. }
Success #stdin #stdout 0s 16064KB
stdin
Standard input is empty
stdout
8F7E1A2B
4
1
2B
1A