cybersecurity · intermediate · ~15 min
Defence-in-depth — local heuristics never replace a proper password policy and hashing scheme.
Implement int is_weak_password(const char *p) returning 1 if the password is weak by any of these (educational, not exhaustive) rules, else 0:
"password", "123456", "qwerty", "letmein".#include <string.h>
int is_weak_password(const char *p) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.