fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. typedef struct
  5. {
  6. int i;
  7. double d;
  8. } SomeStruct;
  9.  
  10. int main(void) {
  11. SomeStruct * s = malloc(sizeof(SomeStruct));
  12. s->i = 11;
  13. printf("%d\n", s->i);
  14. *s = (SomeStruct) {};
  15. printf("%d\n", s->i);
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 2248KB
stdin
Standard input is empty
stdout
11
0