fork(1) download
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. void fun3(int *&p, int a){
  5. p = &a;
  6. }
  7.  
  8. int main(){
  9.  
  10. int *p ;
  11. int y=10, x=5;
  12.  
  13. p=&x;
  14.  
  15. fun3(p,y);
  16.  
  17. cout<<x<<" "<<y<<" "<<*p;
  18.  
  19. return 0;
  20. }
Success #stdin #stdout 0.02s 2724KB
stdin
Standard input is empty
stdout
5 10 10