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?

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?


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