C Piscine Exam 01 — Patched

| Feature | Description | |---------|-------------| | | Must pass (no forbidden functions, proper indentation) | | Memory leaks | Detected by Moulinette (strict malloc / free balance) | | Segfault protection | Null checks, bound checks required | | Static vs dynamic | Must allocate exactly as required (e.g., ft_strdup uses malloc ) | | Prototype matching | Exact function signature | | Hidden tests | Many edge cases tested (empty string, negative numbers, min/max int) |

Write count_words as a helper function (but keep it static or separate—be careful with Norminette line limits). c piscine exam 01