sai_kiran_n's blog

By sai_kiran_n, history, 4 hours ago, In English
  • Vote: I like it
  • 0
  • Vote: I do not like it

»
4 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

When the length of the string is exactly $$$100$$$, fgets(s, MAX_LEN, stdin); reads only these $$$100$$$ characters and not the '\n' character after the string. Therefore, your code cannot judge the end of the string by checking whether it's '\n'.