fork download
  1. #include <stdio.h>
  2.  
  3. typedef struct {
  4. int a;
  5. int b;
  6. } test_t;
  7.  
  8. test_t zikken(test_t tst) {
  9. test_t result;
  10. result.a=2*tst.a+3*tst.b;
  11. result.b=3*tst.a+2*tst.b;
  12. return result;
  13. }
  14.  
  15. int main(void) {
  16. test_t testa;
  17. test_t testb;
  18. testa.a=5;
  19. testa.b=7;
  20. testb=zikken(testa);
  21. printf("%d %d\n",testb.a,testb.b);
  22. return 0;
  23. }
Success #stdin #stdout 0.02s 1720KB
stdin
Standard input is empty
stdout
31 29