Char and string

hey I was solving the problem LADDU of DSA series and it seems that when I use char array to store the string for activity variable the output is multiple lines of 0. But as soon as I replace char activity[20]; with string activity; everything seems to be working fine again. Why does it shows wrong output when I initialize a variable using char array?

https://www.codechef.com/viewsolution/56696042

while you are at it can you also explain what subtasks I failed? and what is that table

Please post your (formatted!) code or link to your solution :slight_smile:

just did

There’s no char array in that solution?

Edit:

As to why that particular solution gets WA: consider the situation where the user finds 100 bugs each of severity 1000.