logo CodeStepByStep logo

function_tracing2

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

What is the output of the following code?

void first() {
    printf("1 ");
}

void second() {
    printf("2 ");
    first();
}

void third() {
    printf("3 ");
    first();
    second();
}

int main() {
    second();
    first();
    second();
    third();
    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.