+ 1
Why my code is not working I runned this code in codeblocks it works
6 ответов
+ 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
+ 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
0
Ops 29 line is bymistake, , sry
What should I put in the 3 rd paramter of fgets