
Write a function that adds up the integers of a range described by two pointers, where the second one marks the slot just after the last integer to read.
sum_range(a, a + 5) with a = {3, 8, 1, 9, 4}Expected result
25For your own tracking. Tests grade your code.
sum_range(a + 1, a + 4) with a = {10, 20, 30, 40, 50}Expected result
90sum_range(a, a) with a = {7, 7, 7}Expected result
0Expected files
sum_range.cAllowed functions
None. Write every helper yourself.

Write a function that adds up the integers of a range described by two pointers, where the second one marks the slot just after the last integer to read.
sum_range(a, a + 5) with a = {3, 8, 1, 9, 4}Expected result
25For your own tracking. Tests grade your code.
sum_range(a + 1, a + 4) with a = {10, 20, 30, 40, 50}Expected result
90sum_range(a, a) with a = {7, 7, 7}Expected result
0Expected files
sum_range.cAllowed functions
None. Write every helper yourself.

Run the tests to grade your code
Build your code, then check each test here. Open a result to inspect its output.
v0.40: Create exercises. Challenge the community.
Meet Studio →