Question from the C++ - Fundamentals test

What does the following code return ? int main() { int i = 1; int& j(i); i = 4; cout << j << endl; j = 6; cout << i << endl; return 0; }

Medium

What does the following code return ?

int main() {
    int i = 1;
    int& j(i);
    i = 4;
    cout << j << endl;
    j = 6;
    cout << i << endl;
    return 0;
}
Author: SamuelStatus: PublishedQuestion passed 19 times
Edit
1
Community EvaluationsNo one has reviewed this question yet, be the first!