I'm not surprised you can't debug that code; it's a horrendous mess. Use meaningful variable names, indent code correctly, and use code tags when posting here. You can identify code problems by adding printf statements to it that display intermediate results, for instance as I hinted you could try displaying words as you pull them out of the sentence, then display the consonant count and if it's greater than the previous greatest; these should all help you find the problems.
Why is it "a variant on your program" and not your program itself? Did you find this example online instead of writing it yourself?