Medium
What does the following code display ?
void f(int& x) {
x = x + 1;
cout << "x=" << x << endl;
}
int main() {
int val(1);
f(val);
cout << "val=" << val << endl;
return 0;
}
Author: SamuelStatus: PublishedQuestion passed 265 times
Edit
Similar QuestionsMore questions about C++