cybersecurity · intermediate · ~15 min
Validate fixed-width hex input.
Implement int parse_hex_byte(const char *s, int *out) parsing exactly two hex digits into a value 0..255, returning 1 on success or 0 otherwise.
int parse_hex_byte(const char *s, int *out) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.