Skip to main content

Practice ยท 2 of 4

Fix: Wrong Format Specifier

Implement void format_price(double p, char *out) writing price=<value> into out with snprintf, where <value> uses printf's %g formatting for the double. The classic bug is %d with a double โ€” yours must be correct.

Difficulty: beginner

Back to lesson: Practice: Warning Forensics