fork(1) download
  1. #include <stdio.h>
  2. void cal(int x,int y,int *sum,int *diff,int *mul,int *mod);
  3.  
  4. int main(void) {
  5. int x,y,sum,diff,mul,mod;
  6. printf("x= ");scanf("%d",&x);
  7. printf("y= ");scanf("%d",&y);
  8.  
  9. cal(x,y,&sum,&diff,&mul,&mod);
  10.  
  11. printf("sum = %d\n",sum);
  12. printf("diff = %d\n",&diff);
  13. printf("mul = %d\n",&mul);
  14. printf("mod = %d\n",&mod);
  15.  
  16. return 0;
  17. }
  18.  
  19. void cal(int x,int y,int *sum,int *diff,int *mul,int *mod)
  20. {
  21. *sum=x+y;
  22. *diff=x-y;
  23. *mul=x*y;
  24. *mod=x/y;
  25. }
  26.  
Success #stdin #stdout 0s 5292KB
stdin
Standard input is empty
stdout
x= y= sum = -1681610938
diff = -474365060
mul = -474365056
mod = -474365052