Skip to main content

Practice · 2 of 3

Classify the Flag

CHALLENGE
Difficulty: advanced+25 XP

Implement const char *flag_intent(const char *flag) mapping each flag to its intent class: '-Wall' → "warnings", '-Werror' → "escalation", '-g' → "debug-info", '-O2' → "optimization", '-c' → "compile-only", '-fsanitize=address' → "runtime-check", anything else → "other".

Back to lesson: Practice: Build Model Drills