fork(1) download
  1. #include <stdio.h>
  2.  
  3. struct X
  4. {
  5. int x;
  6. char TB[0];
  7. };
  8.  
  9.  
  10. int main()
  11. {
  12. char msg[]="Ala ma kota";
  13. struct X *p=(struct X *)malloc(sizeof(struct X)+strlen(msg)+1);
  14. p->x=1;
  15. strcpy(p->TB,msg);
  16. printf("%d -> %s\n",p->x,p->TB);
  17. return 0;
  18. }
Success #stdin #stdout 0s 2424KB
stdin
Standard input is empty
stdout
1 -> Ala ma kota