fork download
  1. #include <iostream>
  2. using namespace std;
  3. int a=10;
  4.  
  5.  
  6. int f(int a, int *b, int &c)
  7. {
  8.  
  9. a=100;
  10. *b=200;
  11. c=300;
  12. return a+(*b)+c;
  13. }
  14. int main() {
  15. cout << &a << endl;
  16. int a=1, b=2, c=3;
  17. a = f(a,&b,c);
  18. cout << &a << endl;
  19. cout << &b << endl;
  20. cout << &c << endl;
  21. return 0;
  22. }
Success #stdin #stdout 0.01s 5408KB
stdin
Standard input is empty
stdout
0x55acd5014010
0x7ffd3ef309fc
0x7ffd3ef30a00
0x7ffd3ef30a04