Please someone assist me here in solving security challenge? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Please someone assist me here in solving security challenge?

https://code.sololearn.com/cNf60xtp8foX/?ref=app The problem is testcase 5 is not working but the other test cases are working but all i know is that test case 5 should be "quiet". In my code snippet i cannot see any error at all.

15th Sep 2022, 8:18 PM
Daniel Kagombe
Daniel Kagombe - avatar
4 Answers
+ 2
Yes 30 is ok you can do this to init char array and be sure of length: #include <iostream> #include <cstring> using namespace std; int main() { string in; cin>>in; int size = in.length(); char floor[size]; strcpy(floor, in.c_str()); // your code
15th Sep 2022, 8:52 PM
Roland
Roland - avatar
+ 3
I think Input length greater than 20. so not enough size
15th Sep 2022, 8:51 PM
Jayakrishna 🇮🇳
+ 3
Thankyou guys.I really appretiate
16th Sep 2022, 4:28 AM
Daniel Kagombe
Daniel Kagombe - avatar
+ 2
It worked i think the issue was the size
16th Sep 2022, 4:27 AM
Daniel Kagombe
Daniel Kagombe - avatar