Quiz: Whole-Number Division

What does this program print?

#include <stdio.h>

int main(void) {
    int pieces = 23;
    int kids = 5;

    printf("Each: %d\n", pieces / kids);
    printf("Left: %d\n", pieces % kids);
    return 0;
}

Start programming for free

By signing up, you agree to the Terms of Service and Privacy Policy.

Or sign up with:

8/13