+ 1

Why my code is not working I runned this code in codeblocks it works

https://code.sololearn.com/cATN6qhTgFAZ/?ref=app

27th Oct 2019, 3:15 PM
Purushotham
6 Respuestas
+ 4
Use this fgets(str, sizeof(str), stdin); instead of gets(str) and line 23 is Wrong. here should be str[i] == ' ' but you have str[i] = ' '; = it's mean assignment and == it's mean equality
27th Oct 2019, 4:56 PM
A͢J
A͢J - avatar
+ 3
Purushotham this error is because gets() function is not a standard function anymore because it can crash your code by overflowing your buffer. Here, visit this link to get more information https://stackoverflow.com/questions/1694036/why-is-the-gets-function-so-dangerous-that-it-should-not-be-used
27th Oct 2019, 5:01 PM
Arsenic
Arsenic - avatar
0
Ops 29 line is bymistake, , sry What should I put in the 3 rd paramter of fgets
27th Oct 2019, 5:03 PM
Purushotham