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 292 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!
Similar QuestionsMore questions about C++