fork download
  1. #include <iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4.  
  5. int x; //globale
  6.  
  7. void P1()
  8. {
  9. cout<<x<<endl;
  10. }
  11.  
  12. void P2()
  13. {
  14. int x=23;
  15. x++;
  16. P1();
  17. }
  18.  
  19.  
  20. int main() {
  21.  
  22. x=12;
  23. P2();
  24. }
  25.  
  26. /* Output:
  27. 12 */
  28.  
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
12