+ 1

What seems to be wrong in my code?

Need help because i'm at my wits end trying to figure this out. Im relatively new to c programming and i would wanna know why it prints array[1] for the second time at the end. https://code.sololearn.com/cerSA574n7fS/?ref=app

1st Oct 2020, 12:44 PM
Marc Stephen Gabres
Marc Stephen Gabres - avatar
2 Answers
+ 1
At array2[0] your value is exceeding size 27. So you can get undefined behaviour in that case.. Remove a dot or char from that string value....
1st Oct 2020, 1:07 PM
Jayakrishna 🇮🇳
Jayakrishna 🇮🇳 - avatar
0
thanks a lot , solved now
1st Oct 2020, 1:11 PM
Marc Stephen Gabres
Marc Stephen Gabres - avatar