fork download
  1. #include <iostream>
  2. using namespace std;
  3. int x;
  4.  
  5. void P1(int b)
  6. {
  7. cout<<b<<endl;
  8. cout<<x<<endl;
  9. }
  10.  
  11. void P2(int a)
  12. {
  13. a=23;
  14. a++;
  15. P1(a);
  16. }
  17.  
  18. int main() {
  19. x=12;
  20. P2(x);
  21. return 0;
  22. }
Success #stdin #stdout 0.01s 5292KB
stdin
Standard input is empty
stdout
24
12