logo CodeStepByStep logo

basic_function_calls

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

What is the output of the following program?

void message1() {
    printf("This is message1.\n");
}

void message2() {
    printf("This is message2.\n");
    message1();
    printf("Done with message2.\n");
}

int main() {
    message1();
    message2();
    printf("Done with main.\n");
    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.