fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void foo(int &p, const int &q) {
  5. p = 41;
  6. cout<<q<<endl;
  7. }
  8.  
  9. int main() {
  10. int k = 11, l = 11;
  11. foo(k, k);
  12. foo(l, (int)l);
  13. return 0;
  14. }
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
41
11