fork download
  1. #include <stdio.h>
  2.  
  3. typedef struct mystruct
  4. {
  5. void (*ExitFnPtr)(mystruct);
  6. int a;
  7. }mystruct;
  8.  
  9. void f(int a){
  10. printf("%d", a);
  11. }
  12.  
  13. int main()
  14. {
  15. mystruct M;
  16. M.a = 6;
  17. M.ExitFnPtr = f;
  18. M.ExitFnPtr(M.a);
  19.  
  20. printf("Hello, World!\n");
  21.  
  22. return 0;
  23. }
Success #stdin #stdout 0s 2052KB
stdin
Standard input is empty
stdout
6Hello, World!