fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void init(int* &i){
  5. i = new int(24);
  6. }
  7.  
  8. int main() {
  9. // your code goes here
  10. int *i = nullptr;
  11. init(i);
  12. cout << *i;
  13.  
  14. return 0;
  15. }
  16.  
  17.  
Success #stdin #stdout 0s 3272KB
stdin
Standard input is empty
stdout
24