Ad
  • Custom User Avatar

    Please use proper formatting when posting code, for next time...

    You can also print the input to see where it fails, using printf(strin).

    The problem is that there's not only spaces or underscores that you can encounter, and you shouldn't be targetting those anyway. Also, if your first check didn't work, you can simply return.