๐ Bug HuntC C Mediumโก+20 XP
Off-by-One in Loop
This loop writes past the array boundary.
๐ Find the bug
1
int arr[5];2
for (int i = 0; i <= 5; i++) arr[i] = i;๐ The bug is on line 2
This loop writes past the array boundary.
int arr[5];for (int i = 0; i <= 5; i++) arr[i] = i;