fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int dodaj_premie(int a, int b) {
  5. a = a + 100;
  6. b = b + 100;
  7. cout << "W funkcji: a=" << a << ", b=" << b << endl;
  8.  
  9. return 0;
  10. }
  11.  
  12. int main() {
  13. int a = 10, b = 20;
  14. cout << "Przed: a=" << a << ", b=" << b << endl;
  15. dodaj_premie(a, b);
  16. cout << "Po: a=" << a << ", b=" << b << endl;
  17. return 0;
  18. }
Success #stdin #stdout 0s 3140KB
stdin
Standard input is empty
stdout
Przed:      a=10, b=20
W funkcji:  a=110, b=120
Po:         a=10, b=20