C++ Advanced · exercise 06
Sanitizers & bounds discipline
Fix an off-by-one loop that a sanitizer would flag as a buffer overrun.
C++ Advanced lesson 06Guided steps
- 1.The loop currently reads one element past the end of the array.
- 2.Fix the bound so exactly four elements are summed.
- 3.Print the size and the sum.
Your code
Your code is saved in this browser after every run and restored next time.