+ 1
compiling code in sololearn IDE
I have a "piglatin" code in my profile. You can take a look. The problem is that this code perfectly works in CS50 IDE, but runs into a segmentation fault here, in sololearn. So, the question is what limitations have sololearn compiler?
1 Odpowiedź
+ 12
Here is your code 👇
<edit : looks like it has been deleted by OP>
https://code.sololearn.com/c4UEMJjntwKJ/?ref=app
It is giving runtime error because your program is exceeding time alloted to it.
The reason behind it is that you main do-while loop is running till the time it doesn't encounter a newline character ("\n") in the input which will result in infinite loop in most of the cases till the time we don't provide newline character at the end of the input explicitly.