Skip to main content

Practice · 2 of 2

Parse RGB

CHALLENGE
Difficulty: beginner+25 XP

Implement int parse_rgb(const char* text, int* r, int* g, int* b) parsing decimal colors like "12, 200, 3" (comma-separated, optional spaces). Return 1 only when all three parsed, else 0.

Back to lesson: Practice: Parse the Line