fork download
  1. #include <stdio.h>
  2. void compare(int, int*);
  3. main() {
  4. int i = 4, j = 5;
  5. compare(i, &j);
  6. printf("i=%d, j=%d\n", i, j);
  7. }
  8.  
  9. void compare(int k, int* m) {
  10. printf("k1=%d, *m1=%d", k, *m);
  11. k++;
  12. (*m)++;
  13. printf("k2=%d, *m2=%d\n", k, *m);
  14. }
  15.  
Success #stdin #stdout 0s 5280KB
stdin
Standard input is empty
stdout
k1=4, *m1=5k2=5, *m2=6
i=4, j=6