+ 6

How does this array function works here!!

https://code.sololearn.com/cjKGKCi1bFo9/?ref=app how does it outputs 5,0,16,0,-1 when input is 5 I got the answer thks to those who responded , very kind of you guys ❤️

25th May 2018, 2:01 PM
Abhay
Abhay - avatar
6 Réponses
+ 4
thks Donna ,but sorry can you explain more deeply like how does it outputs value 5,0,16,0,-1 when input is 5
25th May 2018, 2:36 PM
Abhay
Abhay - avatar
+ 2
Shiva thks
26th May 2018, 9:37 AM
Abhay
Abhay - avatar
+ 1
by default array element values x - assigned at running time 0 16 0 -1
26th May 2018, 6:29 AM
Shiva
Shiva - avatar
+ 1
are[0] is assigned as 5 while you give input 5 other values are printed as common
26th May 2018, 6:30 AM
Shiva
Shiva - avatar