+ 1

Почему выскакивает ошибка?

Компилятор ругается на NULL https://code.sololearn.com/cs2iGC9Z3e5n/?ref=app

24th Jun 2023, 8:12 PM
moro
moro - avatar
1 Resposta
+ 4
instruction in line 32 is redundant. beside that it is not safe to directly assign NULL to an int ( int c++ >= 11) ( The standard does not define the behavior of your assignment on such an implementation, so its behavior is undefined ). also line 34: newArr[i - 1] = arr[i] // index out of bounds, also UB change it to : newArr[i] = arr[i+1];
24th Jun 2023, 11:01 PM
MO ELomari
MO ELomari - avatar