Skip to main content

Practice · 4 of 4

va_list Windows onto the Convention

CHALLENGE
Difficulty: advanced+25 XP

Implement int sum_ints(int count, ...) using va_start/va_arg/va_end to total count int arguments, and double sum_dbls(int count, ...) doing the same for doubles. The header is the standard's only portable view of how variadic arguments physically travel.

Back to lesson: Practice: ABI Contract Drills