fork download
  1. #include <stdio.h>
  2.  
  3. typedef struct {
  4. int a;
  5. int b;
  6. int c;
  7. } foo_t;
  8.  
  9. foo_t get_foo(void)
  10. {
  11. foo_t foo = {100, 200, 300};
  12. return foo;
  13. }
  14.  
  15. int main(void)
  16. {
  17. foo_t foo = get_foo();
  18. printf("%d, %d, %d\n", foo.a, foo.b, foo.c);
  19. return 0;
  20. }
Success #stdin #stdout 0s 1788KB
stdin
Standard input is empty
stdout
100, 200, 300