+ 2

Pig Latin Problem

Test case 5 is failing. Don't know why . https://code.sololearn.com/c04IesMj1StN/?ref=app

5th Jul 2020, 7:15 AM
Aditya Raj
Aditya Raj - avatar
3 Respuestas
+ 10
add buff[j] = '\0'; before printf you're printing a string without null termination
5th Jul 2020, 7:41 AM
✳AsterisK✳
✳AsterisK✳ - avatar
+ 8
Aditya Raj Just change buff size 100 to 50. I also don't know why it happens but it works 😁😁
5th Jul 2020, 7:32 AM
A͢J
A͢J - avatar
+ 7
And that code can work in c++ just add #include <iostream> using namespace std; Idk the difference
5th Jul 2020, 7:43 AM
᮴Ridwan_
᮴Ridwan_ - avatar