cybersecurity · beginner · ~15 min · safe pentest lab

Parent PID from status

Extract the parent PID specifically.

Challenge

Implement int parse_ppid(const char *status) returning the integer after "PPid:", or -1 if absent.

Starter code

#include <string.h>
#include <stdlib.h>

int parse_ppid(const char *status) {
    /* TODO */
    return -1;
}

Solve this exercise in the browser editor — compile and run against the test harness, no setup required.