cybersecurity · beginner · ~15 min · safe pentest lab
Count elements in XML output.
Implement int count_hosts(const char *xml) returning the number of <host opening tags.
#include <string.h>
int count_hosts(const char *xml) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.