basics · beginner · ~15 min
Model exit-code conventions.
main returns 0 for success, non-zero for failure. Implement int program_status(int errors) returning 0 when errors is 0, otherwise 1.
int program_status(int errors) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.