Why last element of an array is not displaying? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Why last element of an array is not displaying?

Inserting new element in an array https://code.sololearn.com/c3RiNQ1J9YZf/?ref=app

11th Jul 2023, 4:01 PM
KGS Sumanth
KGS Sumanth - avatar
3 Respostas
+ 2
https://code.sololearn.com/cdkLzxt658df/?ref=app
12th Jul 2023, 1:52 AM
WaRRioRƗMKB
WaRRioRƗMKB - avatar
+ 3
arrays have a fixed length. when you shift the elements by one position, the last element drops out. there is not 7th element as you defined the array to have 6 elements.
11th Jul 2023, 4:15 PM
Lisa
Lisa - avatar
0
You have to create a array like this
12th Jul 2023, 1:53 AM
WaRRioRƗMKB
WaRRioRƗMKB - avatar