cybersecurity · intermediate · ~15 min · safe pentest lab
Filter lines by suffix.
Implement int count_of_domain(const char *list, const char *domain) returning how many lines end with domain (e.g. ".example.com").
#include <string.h>
int count_of_domain(const char *list, const char *domain) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.