fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int add(int* a, int* b) {
  5. return *a + *b;
  6. }
  7.  
  8. int main() {
  9. int x = 10, y = 20;
  10. cout << add(&x, &y) << endl;
  11. return 0;
  12. }
Success #stdin #stdout 0.01s 5444KB
stdin
Standard input is empty
stdout
30