+ 1

Why this program wont give output if input is more than 8 characters?

https://code.sololearn.com/c6dKpeQRaZfW/?ref=app

1st Feb 2019, 9:20 AM
Jari
Jari - avatar
4 Réponses
+ 2
Because size of int is 4, size of char is 2 so the size of char array is => 4*2 = 8.
1st Feb 2019, 9:25 AM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
0
Thank you Julien Quentin! I fixed the program as you adviced and now it works fine!
1st Feb 2019, 10:28 AM
Jari
Jari - avatar