cybersecurity · beginner · ~15 min
Aggregate the success of a sequence of calls.
Implement int all_ok(const int *rcs, int n) returning 1 if all n return codes are >= 0, else 0 (fail-fast on the first error in a chain).
int all_ok(const int *rcs, int n) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.