logo CodeStepByStep logo

function_tracing1

Language/Type: C function basics
Author: Allison Obourn (on 2020/09/14)

What is the output of the following code?

void message1() {
    printf("7 ");
}

void message2() {
    printf("5 ");
    message1();
    printf("6 ");
}

int main() {
    message1();
    message2();
    printf("4 ");
    return 0;
}
Output:

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.