fork(1) download
  1. #include <stdio.h>
  2.  
  3. void cal(int x, int y,int *add,int *sub);
  4. int main(void) {
  5. // your code goes here
  6. int n1,n2,a,b;
  7. cal(n1,n2,&a,&b);
  8. printf("*add : %d, *sub : %d",a,b);
  9. return 0;
  10. }
  11. void cal(int x,int y,int *add,int *sub){
  12. *add=x+y;
  13. *sub=x-y;
  14. }
Success #stdin #stdout 0s 5284KB
stdin
Standard input is empty
stdout
*add : 0, *sub : 0