fork(2) download
  1. #include <stdio.h>
  2.  
  3. typedef struct MyStruct MyStruct;
  4.  
  5. void foo(MyStruct* s);
  6.  
  7. struct MyStruct {
  8. int a;
  9. int b;
  10. };
  11.  
  12. void foo(MyStruct *p) {
  13. printf("%d %d\n", p->a, p->b);
  14. }
  15.  
  16. int main(void) {
  17. MyStruct ms = {a:100, b:120};
  18. foo(&ms);
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0s 4272KB
stdin
Standard input is empty
stdout
100 120