fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void add(int x, int y, int* result)
  5. {
  6. *result = x + y;
  7. }
  8.  
  9. int main()
  10. {
  11. int result;
  12.  
  13. add(2,3, &result);
  14. cout << result << endl;
  15. return 0;
  16. }
Success #stdin #stdout 0s 2896KB
stdin
Standard input is empty
stdout
5