๐ Bug HuntC C Mediumโก+20 XP
Memory Leak
This code allocates memory but has a bug.
๐ Find the bug
1
int *arr = malloc(5 * sizeof(int));2
for (int i = 0; i < 5; i++) arr[i] = i;3
// Program ends here๐ The bug is on line 3