Skip to main content

Practice ยท 4 of 4

Parameter, Not Global

CHALLENGE
Difficulty: beginner+25 XP

Implement int total_sum(const int* a, int n) returning the sum โ€” full marks only if you use NO file-scope variables (parameter in, return out).

Back to lesson: Practice: Scope & Storage