Why last element of an array is not displaying? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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 Answers
+ 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