Practice ยท 4 of 4
Environment or Default?
CHALLENGE
Difficulty: advanced+25 XP
Implement const char *env_or_default(const char *name, const char *dflt) โ return the environment value if name is set (getenv, ISO C), otherwise return dflt. NULL name or NULL dflt returns NULL. This is the inherited-state boundary every 12-factor program leans on.
Press Submit to check your solution.
Back to lesson: Practice: Process Machinery Drills