fork download
  1. #include <stdio.h>
  2. #include <stddef.h>
  3. #include <stdlib.h>
  4. #include <stdbool.h>
  5.  
  6. typedef struct header{
  7. bool status; // 1
  8. size_t size; // 8
  9. void** next; // 8
  10. void** previous; // 8
  11. }header_t;
  12.  
  13. int main(){
  14. void* PTR = malloc(800);
  15.  
  16.  
  17. header_t a;
  18. a.status = false;
  19. a.size = 14;
  20. a.next = &a;
  21.  
  22. printf("%d\n", *((bool*)PTR));
  23. printf("%ld\n", *((int*)(PTR+8)));
  24. printf("%p\n", ((void*)(PTR+9)));
  25.  
  26. return 0;
  27. }
Success #stdin #stdout 0s 4544KB
stdin
Standard input is empty
stdout
0
0
0x5618f77d0269