fork download
  1. #include <stdio.h>
  2.  
  3. void update(int *x, float *y) {
  4. *x = *x + 10; // modifying original int
  5. *y = *y * 2; // modifying original float
  6. }
  7.  
  8. int main() {
  9. int a = 5;
  10. float b = 3.5;
  11.  
  12. update(&a, &b);
  13.  
  14. printf("Updated a = %d\n", a);
  15. printf("Updated b = %.1f\n", b);
  16.  
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
Updated a = 15
Updated b = 7.0