fork(1) download
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <stdlib.h>
  4.  
  5. typedef struct
  6. {
  7. int y;
  8. char* x;
  9. } fuck;
  10.  
  11. typedef struct
  12. {
  13. int y;
  14. char* x;
  15. int z;
  16. } ba;
  17.  
  18. int main(void)
  19. {
  20. fuck f = {x:"Fuck", y:0xFF};
  21. ba gor = {z:42};
  22. memcpy (&gor, &f, sizeof(fuck));
  23. printf ("%s 0%X %d",gor.x,gor.y,gor.z);
  24. return 0;
  25. }
  26.  
Success #stdin #stdout 0s 5568KB
stdin
Standard input is empty
stdout
Fuck 0FF 42