cybersecurity · intermediate · ~15 min
Enforce a composition policy.
Implement int password_ok(const char *pw) returning 1 only if pw is at least 8 characters and contains at least one lowercase, one uppercase, and one digit.
int password_ok(const char *pw) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.