Back to Code Walkthrough
Reference vs Value Parameter
C++ code walkthrough · Question 1Code
Read carefully. What does this print?1#include <iostream>2using namespace std;34void modify(int a, int &b) {5 a = a + 10;6 b = b + 10;7}89int main() {10 int x = 5, y = 5;11 modify(x, y);12 cout << x << " " << y << endl;13 return 0;14}