Skip to main content

Practice ยท 2 of 3

Cleanup All

CHALLENGE
Difficulty: beginner+25 XP

Implement void cleanup(int *a, int *b, int *c) freeing each NON-NULL pointer among the three. (free(NULL) is safe anyway โ€” call free unconditionally if you prefer.)

Back to lesson: Practice: Ownership Discipline