fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void test(double * t){
  5. *t = 10.0;
  6. cout << *t << endl;
  7. }
  8.  
  9. int main() {
  10. double d = 1;
  11. cout << d << endl;
  12. test(&d);
  13. cout << d << endl;
  14. // your code goes here
  15. return 0;
  16. }
Success #stdin #stdout 0s 3412KB
stdin
Standard input is empty
stdout
1
10
10