linux-sysprog · beginner · ~15 min
Distinguish absolute from relative paths.
execv needs an absolute path (no PATH search). Implement int is_absolute_path(const char *p) returning 1 if p is non-empty and starts with '/', else 0.
int is_absolute_path(const char *p) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.