logo CodeStepByStep logo

parameterMystery9

The following code produces 3 lines of output. What is the output? Write each line of output as it would appear on the console.

null
int parameterMystery9(int* b, int& c, int a) {
    (*b)++;
    c += 3;
    a += 5;
    cout << c << " " << a << " " << *b << endl;
    return a;
}

int main() {
    int a =   10;
    int b =  200;
    int c = 3000;

    parameterMystery9(&a, b, c);
    int d = parameterMystery9(&b, c, a);
    cout << a << " " << b << " " << c << " " << d << endl;

    return 0;
}

line 1
line 2
line 3

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.