fork(4) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void foo(const float x, float a[]) {
  5. cout << x << endl;
  6. a[0] += 10.5;
  7. cout << x << endl;
  8. }
  9.  
  10. int main() {
  11. float a[1] = { 3.25 };
  12. foo(a[0], a);
  13. return 0;
  14. }
Success #stdin #stdout 0s 3412KB
stdin
Standard input is empty
stdout
3.25
3.25