fork download
  1.  
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. int Plus(int a,int b)
  6. {
  7. return a + b;
  8. }
  9.  
  10. void Minus(int a,int b,int c)
  11. {
  12. c = a - b;
  13. cout << "Call By Value c =" << c << endl;
  14. }
  15.  
  16. // 프로그램 주 실행 점.
  17. int main()
  18. {
  19. int a = 5;
  20. int b = 10;
  21. int c = Plus(a,b);
  22.  
  23. Minus(a,b,c);
  24. cout << "c =" << c << endl;
  25. return 0;
  26. }
Success #stdin #stdout 0s 16064KB
stdin
Standard input is empty
stdout
Call By Value c =-5
c =15