0

Why this happen

I still dont understand when you add a new value to an index witch doesnt exist and wher this four come for last line I want an explication fir this 3 and for and why not 9 ? https://code.sololearn.com/coQM5xI6uHqg/?ref=app

2nd Nov 2019, 9:01 PM
Abdelhakim Cube Emp Gu Ayed
Abdelhakim Cube Emp Gu Ayed - avatar
2 Antworten
0
thats due to buffer overflow, which will generate a garbage value, you're accessing beyond the array bound. to get your desired output set t[4] and assign t[4] =9;
2nd Nov 2019, 9:50 PM
✳AsterisK✳
✳AsterisK✳ - avatar
0
How to set a new index to be able to pit smth on
2nd Nov 2019, 10:01 PM
Abdelhakim Cube Emp Gu Ayed
Abdelhakim Cube Emp Gu Ayed - avatar