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