fork download
  1. #include <stdio.h>
  2.  
  3. int sub1(int x,int*y){
  4. x+=5;
  5. *y*=2;
  6. return *y+x;
  7. }
  8. int sub2(int *x,int y){
  9. *x+=5;
  10. y*=2;
  11. return *x+y;
  12. }
  13.  
  14.  
  15. int main(void) {
  16. int a=3,b=5,c,d;
  17. c=sub1(a,&b)+sub2(&a,b);
  18. d=sub2(&a,b)+sub1(a,&b);
  19.  
  20. printf("a=%d b=%d c=%d d=%d",a,b,c,d);
  21. return 0;
  22. }
  23.  
Success #stdin #stdout 0s 9424KB
stdin
Standard input is empty
stdout
a=13 b=20 c=46 d=71